[go: up one dir, main page]

Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: marinofaggiana <ios@nextcloud.com>
  • Loading branch information
marinofaggiana committed Feb 1, 2022
1 parent 0308dc1 commit 4406b09
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions Share/NCShareExtension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,6 @@ class NCShareExtension: UIViewController {
func cancel(with error: NCShareExtensionError) {
// make sure no uploads are continued
uploadStarted = false
// for metadata in uploadMetadata {
// let filePath = CCUtility.getDirectoryProviderStorageOcId(metadata.ocId, fileNameView: metadata.fileNameView)!
// let path = CCUtility.getDirectoryProviderStorageOcId(metadata.ocId)!
// NCManageDatabase.shared.deleteMetadata(predicate: NSPredicate(format: "ocId == %@", metadata.ocId))
// NCNetworking.shared.uploadRequest[filePath]?.tasks.forEach({ $0.cancel() })
// NCUtilityFileSystem.shared.deleteFile(filePath: path)
// }
extensionContext?.cancelRequest(withError: error)
}

Expand Down Expand Up @@ -368,8 +361,10 @@ extension NCShareExtension {
self.counterUploaded += 1
self.upload()
} else {
let path = CCUtility.getDirectoryProviderStorageOcId(metadata.ocId)!
NCManageDatabase.shared.deleteMetadata(predicate: NSPredicate(format: "ocId == %@", metadata.ocId))
NCManageDatabase.shared.deleteChunks(account: metadata.account, ocId: metadata.ocId)
NCUtilityFileSystem.shared.deleteFile(filePath: path)
self.uploadErrors.append(metadata)
}
}
Expand Down

0 comments on commit 4406b09

Please sign in to comment.