instance uses new nikiroo-utils
authorNiki Roo <niki@nikiroo.be>
Tue, 28 May 2019 19:54:47 +0000 (21:54 +0200)
committerNiki Roo <niki@nikiroo.be>
Tue, 28 May 2019 19:54:47 +0000 (21:54 +0200)
src/be/nikiroo/fanfix/Instance.java

index 74221b00916e499f3a2cbfdf41d6e1b65aa2fbf4..a6462323492bf3356413403778bcaeb29b504b4d 100644 (file)
@@ -507,11 +507,7 @@ public class Instance {
         * @return the path
         */
        private static File getFile(Config id, File def) {
-               String path = config.getString(id);
-               if (path != null && path.isEmpty()) {
-                       path = def.getPath();
-               }
-
+               String path = config.getString(id, def.getPath());
                return getFile(path);
        }
 
@@ -521,11 +517,7 @@ public class Instance {
         * @return the path
         */
        private static File getFile(UiConfig id, File def) {
-               String path = uiconfig.getString(id);
-               if (path != null && path.isEmpty()) {
-                       path = def.getPath();
-               }
-
+               String path = uiconfig.getString(id, def.getPath());
                return getFile(path);
        }