diff options
| author | 2024-04-07 23:13:24 +0900 | |
|---|---|---|
| committer | 2024-04-07 15:13:24 +0100 | |
| commit | 537ecc84ca0e2119673301aa96176675504042e1 (patch) | |
| tree | edb6015b9b88a3589f22b4e66ae3403a83bd38ec | |
| parent | Add file extensions to open and save dialogs (#532) (diff) | |
| download | enigma-537ecc84ca0e2119673301aa96176675504042e1.tar.gz enigma-537ecc84ca0e2119673301aa96176675504042e1.tar.xz enigma-537ecc84ca0e2119673301aa96176675504042e1.zip | |
fix NoSuchFileException when exporting sources (not jar) (#494)
* fix writer doesnt create file
* Update enigma/src/main/java/cuchaz/enigma/EnigmaProject.java
Co-authored-by: Alejandro González <7822554+AlexTMjugador@users.noreply.github.com>
* doesnt need to create file manually
Co-authored-by: modmuss <modmuss50@gmail.com>
---------
Co-authored-by: Alejandro González <7822554+AlexTMjugador@users.noreply.github.com>
Co-authored-by: modmuss <modmuss50@gmail.com>
| -rw-r--r-- | enigma/src/main/java/cuchaz/enigma/EnigmaProject.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/enigma/src/main/java/cuchaz/enigma/EnigmaProject.java b/enigma/src/main/java/cuchaz/enigma/EnigmaProject.java index b3a7274f..f9db4d18 100644 --- a/enigma/src/main/java/cuchaz/enigma/EnigmaProject.java +++ b/enigma/src/main/java/cuchaz/enigma/EnigmaProject.java | |||
| @@ -354,6 +354,8 @@ public class EnigmaProject { | |||
| 354 | } | 354 | } |
| 355 | 355 | ||
| 356 | public void writeTo(Path path) throws IOException { | 356 | public void writeTo(Path path) throws IOException { |
| 357 | Files.createDirectories(path.getParent()); | ||
| 358 | |||
| 357 | try (BufferedWriter writer = Files.newBufferedWriter(path)) { | 359 | try (BufferedWriter writer = Files.newBufferedWriter(path)) { |
| 358 | writer.write(source); | 360 | writer.write(source); |
| 359 | } | 361 | } |