JS: Recursively delete source archive so emptiness detection works

This commit is contained in:
Asger F
2025-10-27 13:29:02 +01:00
parent a5819a14be
commit 0acfacefbf

View File

@@ -498,12 +498,9 @@ public class AutoBuild {
// ensuring that the finalize steps detects that no code was seen.
Path srcFolder = Paths.get(EnvironmentVariables.getWipDatabase(), "src");
try {
// Non-recursive delete because "src/" should be empty.
FileUtil8.delete(srcFolder);
FileUtil8.recursiveDelete(srcFolder);
} catch (NoSuchFileException e) {
Exceptions.ignore(e, "the directory did not exist");
} catch (DirectoryNotEmptyException e) {
Exceptions.ignore(e, "just leave the directory if it is not empty");
}
return 0;
}