Skip to content

Commit

Permalink
fix: trim whitespace from global filepath (#23)
Browse files Browse the repository at this point in the history
On POSIX systems, files are supposed to end with line breaks. Many text
editors will uphold this rule and place a newline at the end of the
standardsettings.global file, which prevents it from being loaded
because the filepath should not end with a newline.
  • Loading branch information
tesselslate authored Oct 21, 2024
1 parent 7f967b2 commit 3ba73f3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ public File getConfigFile() {
Path globalRedirect = SpeedrunConfigAPI.getConfigDir().resolve("standardsettings.global");
if (Files.exists(globalRedirect)) {
try {
File file = new File(new String(Files.readAllBytes(globalRedirect)));
File file = new File(new String(Files.readAllBytes(globalRedirect)).trim());
if (file.isFile()) {
return file;
}
Expand Down

0 comments on commit 3ba73f3

Please sign in to comment.