diff --git a/arduino-core/src/processing/app/BaseNoGui.java b/arduino-core/src/processing/app/BaseNoGui.java index 6dbba24a0..dece1b201 100644 --- a/arduino-core/src/processing/app/BaseNoGui.java +++ b/arduino-core/src/processing/app/BaseNoGui.java @@ -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); }