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

Skip to content
Snippets Groups Projects
Commit 7b53b0d3 authored by idk's avatar idk
Browse files

leave roaming appdir installs that already exist alone

parent ff293d50
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,7 @@ If you're having trouble, check the
website at https://geti2p.net/, or get on irc://irc.freenode.net/#i2p
I2P will create and store files and configuration data in the user directory
~/.i2p/ on Linux and %APPDATA%\I2P\ on Windows. This directory is created
~/.i2p/ on Linux and %LOCALAPPDATA%\I2P\ on Windows. This directory is created
when I2P is run for the first time. It also creates files in the system
temporary directory specified by the Java Virtual Machine.
To change the location of these directories, or to configure I2P to
......
<%
/*
* Created on Sep 02, 2005
*
*
* This file is part of susidns project, see http://susi.i2p/
*
*
* Copyright (C) 2005 <susi23@mail.i2p>
*
* This program is free software; you can redistribute it and/or modify
......@@ -19,7 +19,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*
* $Revision: 1.1 $
*/
......@@ -85,7 +85,7 @@
<h3><%=intl._t("Hints")%></h3>
<ol>
<li>
<%=intl._t("File and directory paths here are relative to the addressbook's working directory, which is normally ~/.i2p/addressbook/ (Linux) or %APPDATA%\\I2P\\addressbook\\ (Windows).")%>
<%=intl._t("File and directory paths here are relative to the addressbook's working directory, which is normally ~/.i2p/addressbook/ (Linux) or %LOCALAPPDATA%\\I2P\\addressbook\\ (Windows).")%>
</li>
<li>
<%=intl._t("If you want to manually add lines to an addressbook, add them to the private or master addressbooks.")%>
......
......@@ -50,11 +50,11 @@ public class FixWinPaths{
String line;
while ((line = br.readLine()) != null) {
if (line.startsWith("wrapper.logfile="))
line = "wrapper.logfile=%appdata%\\i2p\\wrapper.log";
line = "wrapper.logfile=%localappdata%\\i2p\\wrapper.log";
else if (line.startsWith("#wrapper.java.pidfile="))
line = "#wrapper.java.pidfile=%appdata%\\i2p\\routerjvm.pid";
line = "#wrapper.java.pidfile=%localappdata%\\i2p\\routerjvm.pid";
else if (line.startsWith("#wrapper.pidfile="))
line = "#wrapper.pidfile=%appdata%\\i2p\\i2p.pid";
line = "#wrapper.pidfile=%localappdata%\\i2p\\i2p.pid";
if (line.contains("\\i2p/"))
line = line.replace("\\i2p/", "\\i2p\\");
if (line.contains("lib/"))
......
......@@ -83,6 +83,15 @@ public class WorkingDir {
String appdata = System.getenv("LOCALAPPDATA");
if (appdata != null)
home = appdata;
// 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
String oldappdata = System.getenv("APPDATA");
if (oldappdata != null) {
File checkOld = new File(oldappdata, WORKING_DIR_DEFAULT_WINDOWS);
if (checkOld.exists() && checkOld.isDirectory())
home = appdata;
}
dirf = new SecureDirectory(home, WORKING_DIR_DEFAULT_WINDOWS);
} else if (SystemVersion.isMac()) {
String appdata = "/Library/Application Support/";
......
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