Switch I2P and I2P_CONFIG for environment variable based install-path configuration

This commit is contained in:
idk
2022-02-19 11:13:27 -05:00
parent 09d07c8c88
commit 723b4d0e27

View File

@ -96,7 +96,7 @@ public class WinLauncher {
}
private static File selectHome() { // throws Exception {
String path_override = System.getenv("I2P");
String path_override = System.getenv("I2P_CONFIG");
File path = new File(path_override);
if (path.exists()) {
if (path.isDirectory())
@ -121,13 +121,13 @@ public class WinLauncher {
}
private static File selectProgramFile() {
String path_override = System.getenv("I2P_CONFIG");
String path_override = System.getenv("I2P");
File path = new File(path_override);
if (path.exists()) {
if (path.isDirectory())
return path.getAbsoluteFile();
else
throw new RuntimeException("I2P_CONFIG is not a directory: " + path);
throw new RuntimeException("I2P is not a directory: " + path);
}
if (SystemVersion.isWindows()) {
File jrehome = new File(System.getProperty("java.home"));