Skip to content

Commit

Permalink
canonicalize script path
Browse files Browse the repository at this point in the history
  • Loading branch information
brachy84 committed Jun 16, 2024
1 parent 0979209 commit 7980d03
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/com/cleanroommc/groovyscript/GroovyScript.java
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,12 @@ public static void initializeRunConfig(File minecraftHome) {
} else {
scriptPath = new File(minecraftHome, "groovy");
}
try {
scriptPath = scriptPath.getCanonicalFile();
} catch (IOException e) {
GroovyLog.get().error("Failed to canonicalize groovy script path '" + scriptPath + "'!");
GroovyLog.get().exception(e);
}
runConfigFile = new File(scriptPath, "runConfig.json");
resourcesFile = new File(scriptPath, "assets");
reloadRunConfig(true);
Expand Down

0 comments on commit 7980d03

Please sign in to comment.