Skip to content

Commit

Permalink
WatchImporter: Handle MODIFY events for .warc.gz files
Browse files Browse the repository at this point in the history
The new Pywb recorder does not use the .open convention so we
need to watch these too.
  • Loading branch information
ato committed Oct 11, 2023
1 parent c8a9db0 commit c3e269d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ui/src/bamboo/task/WatchImporter.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ public void run() {

if (event.kind() == ENTRY_MODIFY && path.toString().endsWith(".warc.gz.open")) {
handleOpenWarc(watch, path);
} else if (event.kind() == ENTRY_CREATE && path.toString().endsWith(".warc.gz")) {
} else if ((event.kind() == ENTRY_CREATE || event.kind() == ENTRY_MODIFY) &&
path.toString().endsWith(".warc.gz")) {
handleClosedWarc(watch, path);
}
} catch (IOException | UncheckedIOException e) {
Expand Down

0 comments on commit c3e269d

Please sign in to comment.