mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-24 05:55:59 +03:00
Properly handle metadata delete after item deletion in FileProviderExtension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
c088f0eb81
commit
7550ed7a1b
1 changed files with 6 additions and 5 deletions
|
@ -580,11 +580,12 @@ class FileProviderExtension: NSObject, NSFileProviderReplicatedExtension, NKComm
|
|||
Logger.fileTransfer.info("Successfully deleted item with identifier: \(identifier.rawValue, privacy: .public) at: \(serverFileNameUrl, privacy: OSLogPrivacy.auto(mask: .hash))")
|
||||
|
||||
if itemMetadata.directory {
|
||||
dbManager.deleteDirectoryAndSubdirectoriesMetadata(ocId: ocId)
|
||||
}
|
||||
|
||||
if dbManager.localFileMetadataFromOcId(ocId) != nil {
|
||||
dbManager.deleteLocalFileMetadata(ocId: ocId)
|
||||
_ = dbManager.deleteDirectoryAndSubdirectoriesMetadata(ocId: ocId)
|
||||
} else {
|
||||
dbManager.deleteItemMetadata(ocId: ocId)
|
||||
if dbManager.localFileMetadataFromOcId(ocId) != nil {
|
||||
dbManager.deleteLocalFileMetadata(ocId: ocId)
|
||||
}
|
||||
}
|
||||
|
||||
completionHandler(nil)
|
||||
|
|
Loading…
Reference in a new issue