make sure hashSupport can access cached hashfile

This commit is contained in:
sirjonasxx 2018-11-17 19:31:52 +01:00
parent 85b2fcd5c0
commit 30def90d77
2 changed files with 12 additions and 5 deletions

View File

@ -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";
}

View File

@ -24,7 +24,7 @@
<!-- Compile our extensions too please! -->
<module>Extensions/AdminOnConnect</module>
<module>Extensions/BlockReplacePackets</module>
<module>Extensions/SpeechColorizer</module>
<module>Extensions/HappySpeech</module>
</modules>
<build>