no message
This commit is contained in:
committed by
Aditya Chandel
parent
6a6a129dd1
commit
4d8dcce7d4
+1
-1
@@ -39,7 +39,7 @@ public class MonitoringTask {
|
|||||||
Path directory = (Path) key.watchable();
|
Path directory = (Path) key.watchable();
|
||||||
Path fullPath = directory.resolve(fileName);
|
Path fullPath = directory.resolve(fileName);
|
||||||
|
|
||||||
if (isPdfOrEpub(fileName)) {
|
if (isPdfOrEpub(fileName) && (kind == StandardWatchEventKinds.ENTRY_CREATE || kind == StandardWatchEventKinds.ENTRY_DELETE)) {
|
||||||
log.info("Event kind: {}; File affected: {}; Full path: {}; Watched folder: {}", kind, fileName, fullPath, directory);
|
log.info("Event kind: {}; File affected: {}; Full path: {}; Watched folder: {}", kind, fileName, fullPath, directory);
|
||||||
eventPublisher.publishEvent(new FileChangeEvent(this, fullPath, kind, directory));
|
eventPublisher.publishEvent(new FileChangeEvent(this, fullPath, kind, directory));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user