diff --git a/arduino-core/src/processing/app/helpers/FileUtils.java b/arduino-core/src/processing/app/helpers/FileUtils.java index 5e30319dc..b668d545e 100644 --- a/arduino-core/src/processing/app/helpers/FileUtils.java +++ b/arduino-core/src/processing/app/helpers/FileUtils.java @@ -344,6 +344,9 @@ public class FileUtils { public static List listFiles(File folder, boolean recursive, List extensions) { List result = new ArrayList<>(); + if (!folder.exists()) { + return result; + } for (File file : folder.listFiles()) { if (isSCCSOrHiddenFile(file))