look for user defined application home

This commit is contained in:
Craig Raw 2021-01-01 10:39:06 +02:00
parent 6ad3f53731
commit 962253beaa

View file

@ -11,6 +11,10 @@ public class PropertyDefiner extends PropertyDefinerBase {
@Override @Override
public String getPropertyValue() { public String getPropertyValue() {
if(System.getProperty(application.toLowerCase() + ".home") != null) {
return System.getProperty(application.toLowerCase() + ".home");
}
return isWindows() ? System.getenv("APPDATA") + "/" + application.substring(0, 1).toUpperCase() + application.substring(1).toLowerCase() : System.getProperty("user.home") + "/." + application.toLowerCase(); return isWindows() ? System.getenv("APPDATA") + "/" + application.substring(0, 1).toUpperCase() + application.substring(1).toLowerCase() : System.getProperty("user.home") + "/." + application.toLowerCase();
} }