Skip to content

Commit 0acface

Browse files
committed
JS: Recursively delete source archive so emptiness detection works
1 parent a5819a1 commit 0acface

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -498,12 +498,9 @@ public int run() throws IOException {
498498
// ensuring that the finalize steps detects that no code was seen.
499499
Path srcFolder = Paths.get(EnvironmentVariables.getWipDatabase(), "src");
500500
try {
501-
// Non-recursive delete because "src/" should be empty.
502-
FileUtil8.delete(srcFolder);
501+
FileUtil8.recursiveDelete(srcFolder);
503502
} catch (NoSuchFileException e) {
504503
Exceptions.ignore(e, "the directory did not exist");
505-
} catch (DirectoryNotEmptyException e) {
506-
Exceptions.ignore(e, "just leave the directory if it is not empty");
507504
}
508505
return 0;
509506
}

0 commit comments

Comments
 (0)