Skip to content

Commit a8e458f

Browse files
committed
accidental checkin
1 parent 61e06b6 commit a8e458f

3 files changed

Lines changed: 7 additions & 18 deletions

File tree

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

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
package com.sandwich.util.io.directories;
22

33
import java.io.File;
4-
import java.net.URISyntaxException;
5-
import java.net.URL;
6-
7-
import com.sandwich.koan.util.ApplicationUtils;
84

95
abstract class DirectorySet {
106

@@ -43,21 +39,14 @@ public String getDataDir(){
4339
}
4440

4541
private static String createBaseDir() {
46-
URL path = DirectorySet.class.getClassLoader().getResource(".");
47-
try {
48-
File dir = new File(path.toURI());
49-
if(ApplicationUtils.isWindows()){
50-
dir = new File(dir.getAbsolutePath().replace("%20", " "));
51-
}
42+
File dir = new File(".");
43+
dir = new File(dir.getAbsolutePath().replace("%20", " "));
44+
if (dir.exists()) {
45+
dir = dir.getParentFile();
5246
if (dir.exists()) {
53-
dir = dir.getParentFile();
54-
if (dir.exists()) {
55-
dir = dir.getParentFile();
56-
}
47+
dir = dir.getParentFile();
5748
}
58-
return dir.getAbsolutePath();
59-
} catch (URISyntaxException e) {
60-
throw new RuntimeException(e);
6149
}
50+
return dir.getAbsolutePath();
6251
}
6352
}

‎koans/lib/koans.jar‎

-282 Bytes
Binary file not shown.

‎koans/src/beginner/AboutKoans.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public class AboutKoans {
88

99
@Koan
1010
public void findAboutKoansFile(){
11-
x fail("delete this line");
11+
fail("delete this line");
1212
}
1313

1414
@Koan

0 commit comments

Comments
 (0)