Fixed dumb infinite recursion

Affects issues:
- Fixed the second issue in #1866
This commit is contained in:
Risto Lahtela 2021-04-25 09:54:46 +03:00
parent 4cf5b79b15
commit 3df7be9ee9

View File

@ -77,10 +77,11 @@ public class OldDependencyCacheDeletionTask extends TaskSystem.Task {
if (files == null) return; if (files == null) return;
for (File file : files) { for (File file : files) {
if (file.isDirectory()) { if (file.isDirectory()) {
deleteDirectory(directory); deleteDirectory(file);
} else { } else {
Files.delete(file.toPath()); Files.delete(file.toPath());
} }
} }
Files.delete(directory.toPath());
} }
} }