mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-31 11:44:36 +00:00
Use old config directory if it exists
This commit is contained in:
committed by
Jindra Petřík
parent
89d7a47453
commit
ab651eaf1e
@@ -1062,6 +1062,7 @@ public final class Configuration {
|
||||
directory = new File(userHome, path);
|
||||
} else {
|
||||
File xdgConfigHome = null;
|
||||
File oldConfigDir = new File(userHome, "." + applicationId + "/");
|
||||
try {
|
||||
String xdgConfigHomeEV = System.getenv("XDG_CONFIG_HOME");
|
||||
if ((xdgConfigHomeEV != null) && (xdgConfigHomeEV.length() > 0)) {
|
||||
@@ -1074,6 +1075,9 @@ public final class Configuration {
|
||||
// ${xdgConfigHome}/${applicationId}
|
||||
String path = applicationId + "/";
|
||||
directory = new File(xdgConfigHome, path);
|
||||
} else if (oldConfigDir.isDirectory()) {
|
||||
// ${userHome}/.${applicationId}
|
||||
directory = oldConfigDir;
|
||||
} else {
|
||||
// ${userHome}/.config/${applicationId}
|
||||
String path = ".config/" + applicationId + "/";
|
||||
|
||||
Reference in New Issue
Block a user