mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-21 20:45:51 +03:00
Ensure upload errors for modified files are recorded in FileProviderExtension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
f4be264eee
commit
4e536dcd65
1 changed files with 6 additions and 0 deletions
|
@ -495,6 +495,12 @@ class FileProviderExtension: NSObject, NSFileProviderReplicatedExtension, NKComm
|
|||
|
||||
guard error == .success, let ocId = ocId/*, size == itemTemplate.documentSize as! Int64*/ else {
|
||||
Logger.fileTransfer.error("Could not upload item \(item.itemIdentifier.rawValue, privacy: .public) with filename: \(item.filename, privacy: OSLogPrivacy.auto(mask: .hash)), received error: \(error, privacy: .public)")
|
||||
|
||||
metadata.status = NextcloudItemMetadataTable.Status.uploadError.rawValue
|
||||
metadata.sessionError = error.errorDescription
|
||||
|
||||
dbManager.addItemMetadata(metadata)
|
||||
|
||||
completionHandler(modifiedItem, [], false, error.toFileProviderError())
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue