mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +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.
|
// ensuring that the finalize steps detects that no code was seen.
|
||||||
Path srcFolder = Paths.get(EnvironmentVariables.getWipDatabase(), "src");
|
Path srcFolder = Paths.get(EnvironmentVariables.getWipDatabase(), "src");
|
||||||
try {
|
try {
|
||||||
// Non-recursive delete because "src/" should be empty.
|
FileUtil8.recursiveDelete(srcFolder);
|
||||||
FileUtil8.delete(srcFolder);
|
|
||||||
} catch (NoSuchFileException e) {
|
} catch (NoSuchFileException e) {
|
||||||
Exceptions.ignore(e, "the directory did not exist");
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user