1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-01-17 06:52:18 +01:00

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

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);
}