Skip to content

Commit

Permalink
fix NoSuchFileException when exporting sources (not jar) (#494)
Browse files Browse the repository at this point in the history
* fix writer doesnt create file

* Update enigma/src/main/java/cuchaz/enigma/EnigmaProject.java

Co-authored-by: Alejandro González <[email protected]>

* �doesnt need to create file manually

Co-authored-by: modmuss <[email protected]>

---------

Co-authored-by: Alejandro González <[email protected]>
Co-authored-by: modmuss <[email protected]>
  • Loading branch information
3 people authored Apr 7, 2024
1 parent 3030b64 commit 537ecc8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions enigma/src/main/java/cuchaz/enigma/EnigmaProject.java
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,8 @@ public static class ClassSource {
}

public void writeTo(Path path) throws IOException {
Files.createDirectories(path.getParent());

try (BufferedWriter writer = Files.newBufferedWriter(path)) {
writer.write(source);
}
Expand Down

0 comments on commit 537ecc8

Please sign in to comment.