forked from I2P_Developers/i2p.i2p
Compare commits
6 Commits
i2p-2.2.0
...
programdat
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1c67f06ffc | ||
|
|
0ce816acd1 | ||
|
|
2fd01c8390 | ||
|
|
16eb1577f9 | ||
|
|
ecd58a833c | ||
|
|
b533ccaabd |
@@ -51,7 +51,8 @@
|
|||||||
Package install, running as a service: <code dir="ltr">/var/lib/i2p/i2p-config/eepsite/docroot/</code>
|
Package install, running as a service: <code dir="ltr">/var/lib/i2p/i2p-config/eepsite/docroot/</code>
|
||||||
</li>
|
</li>
|
||||||
<li><b>Windows</b><br>
|
<li><b>Windows</b><br>
|
||||||
<code dir="ltr">%LOCALAPPDATA%\I2P\eepsite\docroot\</code>
|
Standard install: <code dir="ltr">%LOCALAPPDATA%\I2P\eepsite\docroot\</code>
|
||||||
|
Windows Service install: <code dir="ltr">%PROGRAMDATA%\I2P\eepsite\docroot\</code>
|
||||||
</li>
|
</li>
|
||||||
<li><b>Mac</b><br>
|
<li><b>Mac</b><br>
|
||||||
<code dir="ltr">/Users/(user)/Library/Application Support/i2p</code>
|
<code dir="ltr">/Users/(user)/Library/Application Support/i2p</code>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ if "%1"=="uninstall" (
|
|||||||
) else (
|
) else (
|
||||||
FINDSTR /I "^wrapper.java.additional.5=-Di2p.dir.config=" %_WRAPPER_CONF%
|
FINDSTR /I "^wrapper.java.additional.5=-Di2p.dir.config=" %_WRAPPER_CONF%
|
||||||
if not errorlevel 1 goto end
|
if not errorlevel 1 goto end
|
||||||
echo wrapper.java.additional.5=-Di2p.dir.config="%ALLUSERSPROFILE%\Application Data\i2p" >> %_WRAPPER_CONF%
|
echo wrapper.java.additional.5=-Di2p.dir.config="%PROGRAMDATA%\i2p" >> %_WRAPPER_CONF%
|
||||||
goto end
|
goto end
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<programGroup defaultName="I2P" location="startMenu" />
|
<programGroup defaultName="I2P" location="startMenu" />
|
||||||
<shortcut name="Open I2P Profile Folder (service)"
|
<shortcut name="Open I2P Profile Folder (service)"
|
||||||
target="explorer"
|
target="explorer"
|
||||||
commandLine=""%allusersprofile%\Application Data\i2p""
|
commandLine=""%programdata%\i2p""
|
||||||
iconFile="%systemroot%\system32\shell32.dll"
|
iconFile="%systemroot%\system32\shell32.dll"
|
||||||
iconIndex="3"
|
iconIndex="3"
|
||||||
initialState="normal"
|
initialState="normal"
|
||||||
|
|||||||
@@ -80,14 +80,14 @@ public class WorkingDir {
|
|||||||
} else {
|
} else {
|
||||||
String home = System.getProperty("user.home");
|
String home = System.getProperty("user.home");
|
||||||
if (isWindows) {
|
if (isWindows) {
|
||||||
String appdata = System.getenv("LOCALAPPDATA");
|
String localappdata = System.getenv("LOCALAPPDATA");
|
||||||
if (appdata != null) {
|
if (localappdata != null) {
|
||||||
home = appdata;
|
home = localappdata;
|
||||||
}
|
}
|
||||||
// Don't mess with existing Roaming Application Data installs,
|
// Don't mess with existing Roaming Application Data installs,
|
||||||
// in case somebody is using roaming appdata for a reason
|
// in case somebody is using roaming appdata for a reason
|
||||||
// already. In new installs, use local appdata by default. -idk
|
// already. In new installs, use local appdata by default. -idk
|
||||||
appdata = System.getenv("APPDATA");
|
String appdata = System.getenv("APPDATA");
|
||||||
if (appdata != null) {
|
if (appdata != null) {
|
||||||
File checkOld = new File(appdata, WORKING_DIR_DEFAULT_WINDOWS);
|
File checkOld = new File(appdata, WORKING_DIR_DEFAULT_WINDOWS);
|
||||||
if (checkOld.exists() && checkOld.isDirectory()){
|
if (checkOld.exists() && checkOld.isDirectory()){
|
||||||
@@ -106,6 +106,7 @@ public class WorkingDir {
|
|||||||
if (routerConfig.exists() && clientAppsConfig.exists())
|
if (routerConfig.exists() && clientAppsConfig.exists())
|
||||||
home = appdata;
|
home = appdata;
|
||||||
}
|
}
|
||||||
|
System.err.println("System is Windows: " + home);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dirf = new SecureDirectory(home, WORKING_DIR_DEFAULT_WINDOWS);
|
dirf = new SecureDirectory(home, WORKING_DIR_DEFAULT_WINDOWS);
|
||||||
@@ -391,7 +392,7 @@ public class WorkingDir {
|
|||||||
}
|
}
|
||||||
out.println(s);
|
out.println(s);
|
||||||
}
|
}
|
||||||
System.err.println("Copied " + oldFile + " with modifications");
|
System.err.println("Copied file " + oldFile + " with modifications");
|
||||||
if (out.checkError())
|
if (out.checkError())
|
||||||
throw new IOException("Failed write to " + newFile);
|
throw new IOException("Failed write to " + newFile);
|
||||||
return true;
|
return true;
|
||||||
@@ -456,7 +457,7 @@ public class WorkingDir {
|
|||||||
System.err.println("FAILED copy " + src.getPath());
|
System.err.println("FAILED copy " + src.getPath());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
System.err.println("Created " + targetDir.getPath());
|
System.err.println("Created Directory " + targetDir.getPath());
|
||||||
}
|
}
|
||||||
// SecureDirectory is a File so this works for non-directories too
|
// SecureDirectory is a File so this works for non-directories too
|
||||||
File targetFile = new SecureDirectory(targetDir, src.getName());
|
File targetFile = new SecureDirectory(targetDir, src.getName());
|
||||||
@@ -473,7 +474,7 @@ public class WorkingDir {
|
|||||||
System.err.println("FAILED copy " + src.getPath());
|
System.err.println("FAILED copy " + src.getPath());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
System.err.println("Created " + targetFile.getPath());
|
System.err.println("Created File " + targetFile.getPath());
|
||||||
}
|
}
|
||||||
boolean rv = true;
|
boolean rv = true;
|
||||||
for (int i = 0; i < children.length; i++) {
|
for (int i = 0; i < children.length; i++) {
|
||||||
@@ -497,7 +498,7 @@ public class WorkingDir {
|
|||||||
in = new FileInputStream(src);
|
in = new FileInputStream(src);
|
||||||
out = new SecureFileOutputStream(dst);
|
out = new SecureFileOutputStream(dst);
|
||||||
DataHelper.copy(in, out);
|
DataHelper.copy(in, out);
|
||||||
System.err.println("Copied " + src.getPath());
|
System.err.println("Copied File " + src.getPath());
|
||||||
} catch (IOException ioe) {
|
} catch (IOException ioe) {
|
||||||
System.err.println("FAILED copy " + src.getPath() + ": " + ioe);
|
System.err.println("FAILED copy " + src.getPath() + ": " + ioe);
|
||||||
rv = false;
|
rv = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user