From 0acfacefbfd9fbf1d0230c09d51afa5143c86e81 Mon Sep 17 00:00:00 2001 From: Asger F Date: Mon, 27 Oct 2025 13:29:02 +0100 Subject: [PATCH] JS: Recursively delete source archive so emptiness detection works --- .../extractor/src/com/semmle/js/extractor/AutoBuild.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java b/javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java index f5e998398f5..8d00712b653 100644 --- a/javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java +++ b/javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java @@ -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; }