Skip to content

Commit b493af9

Browse files
author
Felix Siebeneicker
committed
Using canonical path
1 parent e006725 commit b493af9

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

DelvEdit/src/com/interrupt/dungeoneer/editor/ui/FilePicker.java

+10-2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
import java.io.File;
1818
import java.io.FileFilter;
19+
import java.io.IOException;
1920
import java.nio.file.Path;
2021
import java.nio.file.Paths;
2122
import java.util.Comparator;
@@ -285,7 +286,14 @@ public void clicked(InputEvent event, float x, float y) {
285286
}
286287

287288
this.stage = stage;
288-
changeDirectory(new FileHandle(baseDir.file().getAbsoluteFile()));
289+
290+
File file = null;
291+
try {
292+
file = baseDir.file().getCanonicalFile();
293+
} catch (IOException e) {
294+
file = baseDir.file().getAbsoluteFile();
295+
}
296+
changeDirectory(new FileHandle(file));
289297

290298
return super.show(stage);
291299
}
@@ -345,4 +353,4 @@ protected void result(Object object) {
345353
return pick;
346354
}
347355

348-
}
356+
}

0 commit comments

Comments
 (0)