-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Description
When deleting a folder definitively from the trash, with multiple entries, for each entry I get the following DB query:

The first two queries are created by: OC\FilesMetadata\Listener\MetadataDelete::handle
The last one by: OCA\Files\Listener\SyncLivePhotosListener->handle
Both triggered by the same: CacheEntryRemovedEvent
There is at least 2 issues with that:
- It's inefficient because the number of query scale linearly with the number of entries in deleted folder
- We delete the entry in the metadata table and then fetch it to find the corresponding live photo. The fetching is always empty so if there was a live photo, it won't be deleted.