From 7b021a47eb58386e4727fc883ae716ac77501146 Mon Sep 17 00:00:00 2001 From: Zlatin Balevsky Date: Tue, 18 Jun 2019 12:20:10 +0100 Subject: [PATCH] fix detection of moving files into a watched dir on Linux --- .../main/groovy/com/muwire/core/files/DirectoryWatcher.groovy | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/main/groovy/com/muwire/core/files/DirectoryWatcher.groovy b/core/src/main/groovy/com/muwire/core/files/DirectoryWatcher.groovy index e0b5121e..3faa5b7e 100644 --- a/core/src/main/groovy/com/muwire/core/files/DirectoryWatcher.groovy +++ b/core/src/main/groovy/com/muwire/core/files/DirectoryWatcher.groovy @@ -91,6 +91,8 @@ class DirectoryWatcher { log.fine("created entry $f") if (f.isDirectory()) f.toPath().register(watchService, kinds) + else + waitingFiles.put(f, System.currentTimeMillis()) } private void processModified(Path parent, Path path) {