I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit ebb2f139 authored by zab2's avatar zab2
Browse files

Meeh's patch for trac ticket 729

parent 3a4ac1fc
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,15 @@
# should have been replaced by the izpack installer.
# If you did not run the installer, replace them with the appropriate paths.
I2P="%INSTALL_PATH"
I2P_CONFIG_DIR="%USER_HOME/.i2p"
if [ "`uname -s`" == "Darwin" ]; then
if [ -d "%USER_HOME/Library/Application Support" ]; then
I2P_CONFIG_DIR="%USER_HOME/Library/Application Support/i2p"
else
I2P_CONFIG_DIR="%USER_HOME/.i2p"
fi
else
I2P_CONFIG_DIR="%USER_HOME/.i2p"
fi
I2PTEMP="%SYSTEM_java_io_tmpdir"
# PORTABLE installation:
# Use the following instead.
......
......@@ -7,9 +7,9 @@
<key>OnDemand</key>
<false/>
<key>StandardOutPath</key>
<string>~/.i2p/wrapper.log</string>
<string>~/Library/Application Support/i2p/wrapper.log</string>
<key>StandardErrorPath</key>
<string>~/.i2p/wrapper.log</string>
<string>~/Library/Application Support/i2p/wrapper.log</string>
<key>ProgramArguments</key>
<array>
<string>COMMAND</string>
......
......@@ -49,6 +49,7 @@ public class WorkingDir {
private final static String PROP_BASE_DIR = "i2p.dir.base";
private final static String PROP_WORKING_DIR = "i2p.dir.config";
private final static String WORKING_DIR_DEFAULT_WINDOWS = "I2P";
private final static String WORKING_DIR_DEFAULT_MAC = "i2p";
private final static String WORKING_DIR_DEFAULT = ".i2p";
private final static String WORKING_DIR_DEFAULT_DAEMON = "i2p-config";
/** we do a couple of things differently if this is the username */
......@@ -81,6 +82,14 @@ public class WorkingDir {
if (appdata != null)
home = appdata;
dirf = new SecureDirectory(home, WORKING_DIR_DEFAULT_WINDOWS);
} else if (SystemVersion.isMac()) {
String appdata = "/Library/Application Support/";
if (new File(home,appdata).exists()&&false==(new File(home,WORKING_DIR_DEFAULT).exists())) {
home = home+appdata;
dirf = new SecureDirectory(home, WORKING_DIR_DEFAULT_MAC);
} else {
dirf = new SecureDirectory(home, WORKING_DIR_DEFAULT);
}
} else {
if (DAEMON_USER.equals(System.getProperty("user.name")))
dirf = new SecureDirectory(home, WORKING_DIR_DEFAULT_DAEMON);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment