forked from I2P_Developers/i2p.i2p
minor cleanup
This commit is contained in:
@ -71,6 +71,7 @@ public class WorkingDir {
|
|||||||
dir = envProps.getProperty(PROP_WORKING_DIR);
|
dir = envProps.getProperty(PROP_WORKING_DIR);
|
||||||
if (dir == null)
|
if (dir == null)
|
||||||
dir = System.getProperty(PROP_WORKING_DIR);
|
dir = System.getProperty(PROP_WORKING_DIR);
|
||||||
|
|
||||||
boolean isWindows = SystemVersion.isWindows();
|
boolean isWindows = SystemVersion.isWindows();
|
||||||
File dirf = null;
|
File dirf = null;
|
||||||
if (dir != null) {
|
if (dir != null) {
|
||||||
@ -84,11 +85,12 @@ public class WorkingDir {
|
|||||||
dirf = new SecureDirectory(home, WORKING_DIR_DEFAULT_WINDOWS);
|
dirf = new SecureDirectory(home, WORKING_DIR_DEFAULT_WINDOWS);
|
||||||
} else if (SystemVersion.isMac()) {
|
} else if (SystemVersion.isMac()) {
|
||||||
String appdata = "/Library/Application Support/";
|
String appdata = "/Library/Application Support/";
|
||||||
if (new File(home,appdata).exists()&&false==(new File(home,WORKING_DIR_DEFAULT).exists())) {
|
File old = new File(home,WORKING_DIR_DEFAULT);
|
||||||
|
if (old.exists() && old.isDirectory())
|
||||||
|
dirf = new SecureDirectory(home, WORKING_DIR_DEFAULT);
|
||||||
|
else {
|
||||||
home = home+appdata;
|
home = home+appdata;
|
||||||
dirf = new SecureDirectory(home, WORKING_DIR_DEFAULT_MAC);
|
dirf = new SecureDirectory(home, WORKING_DIR_DEFAULT_MAC);
|
||||||
} else {
|
|
||||||
dirf = new SecureDirectory(home, WORKING_DIR_DEFAULT);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (DAEMON_USER.equals(System.getProperty("user.name")))
|
if (DAEMON_USER.equals(System.getProperty("user.name")))
|
||||||
|
Reference in New Issue
Block a user