mirror of
https://github.com/sirjonasxx/G-Earth.git
synced 2024-11-27 02:40:51 +01:00
bugfix
This commit is contained in:
parent
8b13fd5ee9
commit
3dc77492c0
@ -7,6 +7,7 @@ import org.json.JSONObject;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileWriter;
|
import java.io.FileWriter;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.net.URISyntaxException;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -18,7 +19,11 @@ public class Cacher {
|
|||||||
private static final String CACHE_FILENAME = "cache.json";
|
private static final String CACHE_FILENAME = "cache.json";
|
||||||
|
|
||||||
private static String getCacheDir() {
|
private static String getCacheDir() {
|
||||||
return new File(Main.class.getProtectionDomain().getCodeSource().getLocation().getPath()).getParent();
|
try {
|
||||||
|
return new File(Main.class.getProtectionDomain().getCodeSource().getLocation().toURI()).getParent();
|
||||||
|
} catch (URISyntaxException e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean cacheFileExists() {
|
private static boolean cacheFileExists() {
|
||||||
|
@ -79,10 +79,11 @@ public class WindowsHabboClient extends HabboClient {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String g_winmem = new File(this.getClass().getProtectionDomain().getCodeSource().getLocation().toURI()).getParent() + "\\G-WinMem.exe";
|
||||||
if (!useCache)
|
if (!useCache)
|
||||||
pb = new ProcessBuilder(new File(this.getClass().getProtectionDomain().getCodeSource().getLocation().toURI()).getParent() + "\\G-WinMem.exe", hConnection.getClientHostAndPort().substring(0, hConnection.getClientHostAndPort().indexOf(':')) , Integer.toString(hConnection.getPort()));
|
pb = new ProcessBuilder(g_winmem, hConnection.getClientHostAndPort().substring(0, hConnection.getClientHostAndPort().indexOf(':')) , Integer.toString(hConnection.getPort()));
|
||||||
else
|
else
|
||||||
pb = new ProcessBuilder(new File(this.getClass().getProtectionDomain().getCodeSource().getLocation().toURI()).getParent() + "\\G-WinMem.exe", hConnection.getClientHostAndPort().substring(0, hConnection.getClientHostAndPort().indexOf(':')) , Integer.toString(hConnection.getPort()), "-c" + joiner.toString());
|
pb = new ProcessBuilder(g_winmem, hConnection.getClientHostAndPort().substring(0, hConnection.getClientHostAndPort().indexOf(':')) , Integer.toString(hConnection.getPort()), "-c" + joiner.toString());
|
||||||
|
|
||||||
|
|
||||||
Process p = pb.start();
|
Process p = pb.start();
|
||||||
|
@ -20,7 +20,7 @@ public class NormalExtensionRunner implements ExtensionRunner {
|
|||||||
static {
|
static {
|
||||||
String value;
|
String value;
|
||||||
try {
|
try {
|
||||||
value = new File(Main.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath()).getParent();
|
value = new File(Main.class.getProtectionDomain().getCodeSource().getLocation().toURI()).getParent();
|
||||||
} catch (URISyntaxException e) {
|
} catch (URISyntaxException e) {
|
||||||
value = new File(Main.class.getProtectionDomain().getCodeSource().getLocation().getPath()).getParent();
|
value = new File(Main.class.getProtectionDomain().getCodeSource().getLocation().getPath()).getParent();
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
Loading…
Reference in New Issue
Block a user