only declare one string for determining appdata, use old roaming appdata if it is present.

This commit is contained in:
hankhill19580
2019-11-09 08:23:41 +00:00
parent 7b53b0d3ad
commit b5d7f3e460
2 changed files with 8 additions and 4 deletions

View File

@ -1,3 +1,7 @@
2019-11-06 idk
* Router:
- Use Local Application Data(%LOCALAPPDATA%) instead of Roaming for config
2019-11-02 zzz
* Router: NSR/ES fixes for proposal 144
@ -516,7 +520,7 @@
* Fix Debian builds with Jetty 9.4.15 (ticket #2457)
2019-03-11 zab
* Startup: make negative client app delay value mean waiting
* Startup: make negative client app delay value mean waiting
for router to be RUNNING (ticket #2377)
* I2PTunnel: make I2PTunnel default to negative startup delay value
(ticket #2377)

View File

@ -86,9 +86,9 @@ public class WorkingDir {
// 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);
appdata = System.getenv("APPDATA");
if (appdata != null) {
File checkOld = new File(appdata, WORKING_DIR_DEFAULT_WINDOWS);
if (checkOld.exists() && checkOld.isDirectory())
home = appdata;
}