mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-28 03:49:20 +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,12 +580,13 @@ 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)
|
||||
}
|
||||
|
||||
_ = 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