Skip to content

Commit d008d9d

Browse files
committed
Merge pull request #3141 from cmaglie/fix-recursive-delete
Fix for FileUtils.recursiveDelete() when dealing with symbolic links
2 parents 670ad37 + 971bd77 commit d008d9d

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

arduino-core/src/processing/app/helpers/FileUtils.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public static void recursiveDelete(File file) {
8585
recursiveDelete(current);
8686
}
8787
}
88-
deleteIfExists(file);
88+
file.delete();
8989
}
9090

9191
public static File createTempFolder() throws IOException {
@@ -274,10 +274,6 @@ public static boolean deleteIfExists(File file) {
274274
return true;
275275
}
276276

277-
if (!file.exists()) {
278-
return false;
279-
}
280-
281277
return file.delete();
282278
}
283279

0 commit comments

Comments
 (0)