Skip to content

Commit

Permalink
Merge pull request #16691 from iterate-ch/bugfix/MD-22738-watcher
Browse files Browse the repository at this point in the history
Skip watch events for bookmarks already in collection.
  • Loading branch information
dkocher authored Dec 19, 2024
2 parents 55a3579 + 2436763 commit 2c65c29
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,12 @@ public void fileCreated(final Local file) {
else {
try {
final Host bookmark = HostReaderFactory.get().read(file);
log.warn("Add bookmark {}", bookmark);
this.add(bookmark);
for(HostFileListener listener : listeners) {
listener.fileCreated(bookmark);
if(!this.contains(bookmark)) {
log.warn("Add bookmark {}", bookmark);
this.add(bookmark);
for(HostFileListener listener : listeners) {
listener.fileCreated(bookmark);
}
}
}
catch(AccessDeniedException e) {
Expand Down

0 comments on commit 2c65c29

Please sign in to comment.