Skip to content

Commit

Permalink
Override existing file upon goomod export
Browse files Browse the repository at this point in the history
  • Loading branch information
meh2481 committed Dec 25, 2023
1 parent a6caaee commit 3166179
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/java/com/WooGLEFX/File/LevelExporter.java
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,12 @@ public static void exportGoomod(File file, WorldLevel level, ArrayList<_Ball> ba

try {
new ZipUtility().zip(new ArrayList<>(List.of(new File(start + "\\res\\levels\\" + level.getLevelName() + "\\goomod").listFiles())), start + "\\res\\levels\\" + level.getLevelName() + "\\goomod.zip");
new File(start + "\\res\\levels\\" + level.getLevelName() + "\\goomod.zip").renameTo(file);
File srcGoomod = new File(start + "\\res\\levels\\" + level.getLevelName() + "\\goomod.zip");
Files.move(
srcGoomod.toPath(),
file.toPath(),
StandardCopyOption.REPLACE_EXISTING
);
} catch (Exception e) {
Alarms.errorMessage(e);
}
Expand Down

0 comments on commit 3166179

Please sign in to comment.