mirror of
https://github.com/sirjonasxx/G-Earth.git
synced 2024-11-23 08:50:52 +01:00
make sure hashSupport can access cached hashfile
This commit is contained in:
parent
85b2fcd5c0
commit
30def90d77
@ -19,13 +19,20 @@ public class Cacher {
|
||||
private static final String DEFAULT_CACHE_FILENAME = "cache.json";
|
||||
|
||||
private static String getCacheDir() {
|
||||
File GEarthDir = null;
|
||||
try {
|
||||
return new File(Main.class.getProtectionDomain().getCodeSource().getLocation().toURI()).getParent()
|
||||
GEarthDir = new File(Main.class.getProtectionDomain().getCodeSource().getLocation().toURI()).getParentFile();
|
||||
if (GEarthDir.getName().equals("Extensions")) {
|
||||
GEarthDir = GEarthDir.getParentFile();
|
||||
}
|
||||
|
||||
} catch (URISyntaxException e) {
|
||||
// e.printStackTrace();
|
||||
}
|
||||
|
||||
return GEarthDir
|
||||
+ File.separator
|
||||
+ "Cache";
|
||||
} catch (URISyntaxException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user