no message

This commit is contained in:
adityachandelgit
2025-04-14 21:41:18 -06:00
committed by Aditya Chandel
parent 6a6a129dd1
commit 4d8dcce7d4
@@ -39,7 +39,7 @@ public class MonitoringTask {
Path directory = (Path) key.watchable();
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);
eventPublisher.publishEvent(new FileChangeEvent(this, fullPath, kind, directory));
}