mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
JS: Recursively delete source archive so emptiness detection works
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user