Skip to content

Commit

Permalink
create directories for osl versions cache files
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceWalkerRS committed Sep 30, 2024
1 parent 9aa9c12 commit 96729ed
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/net/ornithemc/ploceus/OslVersionCache.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ private JsonArray queryOslModules(String version) throws Exception {
modulesJson = GSON.fromJson(ir, JsonArray.class);
json.add(version, modulesJson);
}
Files.createDirectories(oslVersionCache.getParent());
try (BufferedWriter bw = new BufferedWriter(new FileWriter(oslVersionCache.toFile()))) {
GSON.toJson(json, bw);
}
Expand Down Expand Up @@ -218,6 +219,7 @@ private JsonArray queryOslModuleVersions(String module, String version, GameSide
versionsJson = GSON.fromJson(ir, JsonArray.class);
moduleJson.add(version, versionsJson);
}
Files.createDirectories(moduleVersionCache.getParent());
try (BufferedWriter bw = new BufferedWriter(new FileWriter(moduleVersionCache.toFile()))) {
GSON.toJson(json, bw);
}
Expand Down

0 comments on commit 96729ed

Please sign in to comment.