From 962253beaacfe36b5fb3261bae60b4e126406c19 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Fri, 1 Jan 2021 10:39:06 +0200 Subject: [PATCH] look for user defined application home --- src/main/java/com/sparrowwallet/drongo/PropertyDefiner.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/sparrowwallet/drongo/PropertyDefiner.java b/src/main/java/com/sparrowwallet/drongo/PropertyDefiner.java index 401f6b6..7f36c21 100644 --- a/src/main/java/com/sparrowwallet/drongo/PropertyDefiner.java +++ b/src/main/java/com/sparrowwallet/drongo/PropertyDefiner.java @@ -11,6 +11,10 @@ public class PropertyDefiner extends PropertyDefinerBase { @Override 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(); }