Skip to content

Commit

Permalink
Merge pull request #29 from Core2002/main
Browse files Browse the repository at this point in the history
🐛 Fix: Prevent NullPointerException when creating directories.
  • Loading branch information
Core2002 authored Aug 2, 2024
2 parents 31169df + 84c884d commit 9e23aa3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ private void save(String fileName) {
if (jsonFiles.containsKey(fileName)) {
File file = jsonFiles.get(fileName).first();
JsonObject obj = jsonFiles.get(fileName).second();
file.getParentFile().mkdirs();
if (file.getParentFile() != null) file.getParentFile().mkdirs();
saveFile(file, gson.toJson(obj));
System.out.println(obj);
} else {
Expand Down

0 comments on commit 9e23aa3

Please sign in to comment.