Skip to content

Commit

Permalink
+ fix Could not generate default singularities
Browse files Browse the repository at this point in the history
  • Loading branch information
cnlimiter committed Sep 16, 2023
1 parent 6cf65cc commit 7f7dd2e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,13 @@ public void writeDefaultSingularityFiles() {
var dir = FMLPaths.CONFIGDIR.get().resolve("avaritia/singularities/").toFile();

if (!dir.exists() && dir.mkdirs()) {
Static.LOGGER.warn("Could not find default singularities,try to generate!");
for (var singularity : ModSingularities.getDefaults()) {
var json = SingularityUtils.writeToJson(singularity);
FileWriter writer = null;

try {
var file = new File(dir, singularity.getId() + ".json");
var file = new File(dir, singularity.getId().getPath() + ".json");
writer = new FileWriter(file, StandardCharsets.UTF_8);

GSON.toJson(json, writer);
Expand Down

0 comments on commit 7f7dd2e

Please sign in to comment.