Skip to content

Commit

Permalink
Create directories
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinthegreat1 committed Jan 2, 2025
1 parent c3fbc58 commit 7444fb6
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ public CompletableFuture<Void> load() {
}

public void save() {
try {
Files.createDirectories(file.getParent());
} catch (Exception e) {
LOGGER.error("[Skyblocker Profiled Data] Failed to create directories for file: {}", file, e);
}

try (BufferedWriter writer = Files.newBufferedWriter(file)) {
SkyblockerMod.GSON.toJson(codec.encodeStart(compressed ? JsonOps.COMPRESSED : JsonOps.INSTANCE, data).getOrThrow(), writer);
} catch (Exception e) {
Expand Down

0 comments on commit 7444fb6

Please sign in to comment.