Skip to content

Commit

Permalink
BrowsertrixGatherer: Cleanup pywb QA collection directory
Browse files Browse the repository at this point in the history
  • Loading branch information
ato committed Nov 13, 2023
1 parent 72522b6 commit 3ff91ba
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,12 @@ public void shutdown() {
@Override
public void delete(Instance instance) throws IOException {
workingArea.deleteInstance(instance.getTitle().getPi(), instance.getDateString());
Path pywbDir = pywbService.directoryFor(instance);
if (Files.isSymbolicLink(pywbDir)) {
Files.deleteIfExists(pywbDir);
} else if (Files.isDirectory(pywbDir)) {
workingArea.deleteRecursivelyIfExists(pywbDir);
}
}

@Override
Expand Down

0 comments on commit 3ff91ba

Please sign in to comment.