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

@ -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;
}