Compare commits

...

6 Commits

4 changed files with 28 additions and 26 deletions

View File

@ -51,7 +51,8 @@
Package install, running as a service: <code dir="ltr">/var/lib/i2p/i2p-config/eepsite/docroot/</code>
</li>
<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><b>Mac</b><br>
<code dir="ltr">/Users/(user)/Library/Application Support/i2p</code>

View File

@ -11,7 +11,7 @@ if "%1"=="uninstall" (
) else (
FINDSTR /I "^wrapper.java.additional.5=-Di2p.dir.config=" %_WRAPPER_CONF%
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
)

View File

@ -3,7 +3,7 @@
<programGroup defaultName="I2P" location="startMenu" />
<shortcut name="Open I2P Profile Folder (service)"
target="explorer"
commandLine="&quot;%allusersprofile%\Application Data\i2p&quot;"
commandLine="&quot;%programdata%\i2p&quot;"
iconFile="%systemroot%\system32\shell32.dll"
iconIndex="3"
initialState="normal"

View File

@ -80,14 +80,14 @@ public class WorkingDir {
} else {
String home = System.getProperty("user.home");
if (isWindows) {
String appdata = System.getenv("LOCALAPPDATA");
if (appdata != null) {
home = appdata;
String localappdata = System.getenv("LOCALAPPDATA");
if (localappdata != null) {
home = localappdata;
}
// Don't mess with existing Roaming Application Data installs,
// in case somebody is using roaming appdata for a reason
// already. In new installs, use local appdata by default. -idk
appdata = System.getenv("APPDATA");
String appdata = System.getenv("APPDATA");
if (appdata != null) {
File checkOld = new File(appdata, WORKING_DIR_DEFAULT_WINDOWS);
if (checkOld.exists() && checkOld.isDirectory()){
@ -106,6 +106,7 @@ public class WorkingDir {
if (routerConfig.exists() && clientAppsConfig.exists())
home = appdata;
}
System.err.println("System is Windows: " + home);
}
}
dirf = new SecureDirectory(home, WORKING_DIR_DEFAULT_WINDOWS);
@ -391,7 +392,7 @@ public class WorkingDir {
}
out.println(s);
}
System.err.println("Copied " + oldFile + " with modifications");
System.err.println("Copied file " + oldFile + " with modifications");
if (out.checkError())
throw new IOException("Failed write to " + newFile);
return true;
@ -456,7 +457,7 @@ public class WorkingDir {
System.err.println("FAILED copy " + src.getPath());
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
File targetFile = new SecureDirectory(targetDir, src.getName());
@ -473,7 +474,7 @@ public class WorkingDir {
System.err.println("FAILED copy " + src.getPath());
return false;
}
System.err.println("Created " + targetFile.getPath());
System.err.println("Created File " + targetFile.getPath());
}
boolean rv = true;
for (int i = 0; i < children.length; i++) {
@ -497,7 +498,7 @@ public class WorkingDir {
in = new FileInputStream(src);
out = new SecureFileOutputStream(dst);
DataHelper.copy(in, out);
System.err.println("Copied " + src.getPath());
System.err.println("Copied File " + src.getPath());
} catch (IOException ioe) {
System.err.println("FAILED copy " + src.getPath() + ": " + ioe);
rv = false;