Skip to content

Commit fb7ad96

Browse files
committed
Only delete if allowed to download
1 parent 2fcfb8f commit fb7ad96

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

core/src/main/java/de/bluecolored/bluemap/core/resources/MinecraftVersion.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,10 @@ public static MinecraftVersion load(@Nullable String id, Path dataRoot, boolean
133133
);
134134
} catch (IOException ex) {
135135
// If something went wrong with reading the resource-files, delete them so they will be re-downloaded on the next try.
136-
Files.deleteIfExists(resourcePack);
137-
Files.deleteIfExists(dataPack);
136+
if (allowDownload) {
137+
Files.deleteIfExists(resourcePack);
138+
Files.deleteIfExists(dataPack);
139+
}
138140
throw ex;
139141
}
140142

0 commit comments

Comments
 (0)