diff --git a/ui/src/bamboo/task/WatchImporter.java b/ui/src/bamboo/task/WatchImporter.java index 20f7845..4d43a14 100644 --- a/ui/src/bamboo/task/WatchImporter.java +++ b/ui/src/bamboo/task/WatchImporter.java @@ -130,7 +130,7 @@ private void handleClosedWarc(Config.Watch watch, Path path) throws IOException } // Pywb flocks open files instead of renaming them, so check for a file lock - try (FileChannel channel = FileChannel.open(path, StandardOpenOption.READ)) { + try (FileChannel channel = FileChannel.open(path, StandardOpenOption.WRITE)) { var lock = channel.tryLock(); if (lock == null) { log.finest("WARC has file lock, treating as still open: " + path);