do not emit event if there were no unshared files

auto-update
Zlatin Balevsky 2021-09-06 11:24:10 +01:00
parent 39f3476158
commit 4b50575c13
No known key found for this signature in database
GPG Key ID: A72832072D525E41
1 changed files with 2 additions and 1 deletions

View File

@ -264,7 +264,8 @@ class FileManager {
}
}
}
eventBus.publish(new FileUnsharedEvent(unsharedFiles : unsharedFiles.toArray(new SharedFile[0])))
if (!unsharedFiles.isEmpty())
eventBus.publish(new FileUnsharedEvent(unsharedFiles : unsharedFiles.toArray(new SharedFile[0])))
} else {
def cb = new DirDeletionCallback()
positiveTree.traverse(e.directory, cb)