mirror of
https://github.com/sirjonasxx/G-Earth.git
synced 2024-11-23 00:40:51 +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()
|
||||
+ File.separator
|
||||
+ "Cache";
|
||||
GEarthDir = new File(Main.class.getProtectionDomain().getCodeSource().getLocation().toURI()).getParentFile();
|
||||
if (GEarthDir.getName().equals("Extensions")) {
|
||||
GEarthDir = GEarthDir.getParentFile();
|
||||
}
|
||||
|
||||
} catch (URISyntaxException e) {
|
||||
return null;
|
||||
// e.printStackTrace();
|
||||
}
|
||||
|
||||
return GEarthDir
|
||||
+ File.separator
|
||||
+ "Cache";
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user