Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Files were generated into not-existing folder, added call to create all missing
parent folders.
  • Loading branch information
mcenkar committed Mar 3, 2023
1 parent cd99b62 commit 1369086
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,8 @@ trait SourceFormat {
}
val contents = compilationUnit.codeString.getBytes()
try { // delete old and/or create new
Files.deleteIfExists(path)
Files.deleteIfExists(path) // delete file if exists
Files.createDirectories(path.getParent) // create all parent folders
Files.write(path, contents, StandardOpenOption.CREATE)
()
}
Expand All @@ -232,4 +233,4 @@ trait SourceFormat {
}
}

}
}

0 comments on commit 1369086

Please sign in to comment.