Falling back to "user.dir" in case "APP_DIR" is missing

This commit is contained in:
Federico Fissore 2015-06-29 14:45:51 +02:00
parent 199d069410
commit 6e8e3a7bad
1 changed files with 5 additions and 1 deletions

View File

@ -186,7 +186,11 @@ public class BaseNoGui {
}
static public File getContentFile(String name) {
File installationFolder = new File(System.getProperty("APP_DIR"));
String appDir = System.getProperty("APP_DIR");
if (appDir == null || appDir.length() == 0) {
appDir = currentDirectory;
}
File installationFolder = new File(appDir);
return new File(installationFolder, name);
}