Skip to content

Commit 05ea55f

Browse files
unknownunknown
authored andcommitted
finally an elegant solution to relative fs access
1 parent 0130c4b commit 05ea55f

2 files changed

Lines changed: 1 addition & 8 deletions

File tree

‎koans-lib/src/com/sandwich/util/io/directories/DirectorySet.java‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,6 @@ public String getDataDir(){
3939
}
4040

4141
private static String createBaseDir() {
42-
File dir = new File(Thread.currentThread().getContextClassLoader().getResource(".").getFile().replace("%20", " "));
43-
if (dir.exists()) {
44-
dir = dir.getParentFile();
45-
if (dir.exists()) {
46-
dir = dir.getParentFile();
47-
}
48-
}
49-
return dir.getAbsolutePath();
42+
return new File("").getAbsoluteFile().getParentFile().getAbsolutePath();
5043
}
5144
}

‎koans/lib/koans.jar‎

-1.99 KB
Binary file not shown.

0 commit comments

Comments
 (0)