marinofaggiana hace 3 años
padre
commit
a27c1c97a4
Se han modificado 1 ficheros con 4 adiciones y 5 borrados
  1. 4 5
      iOSClient/Networking/NCNetworkingChunkedUpload.swift

+ 4 - 5
iOSClient/Networking/NCNetworkingChunkedUpload.swift

@@ -156,11 +156,8 @@ extension NCNetworking {
                         }
                                                         
                     } else {
-                            
-                        NCCommunication.shared.deleteFileOrFolder(chunkFolderPath) { (_, _, _) in
-                                
-                            self.uploadChunkFileError(metadata: metadata, chunkFolderPath: chunkFolderPath, directoryProviderStorageOcId: directoryProviderStorageOcId, errorCode: uploadErrorCode, errorDescription: uploadErrorDescription)
-                        }
+                                                            
+                        self.uploadChunkFileError(metadata: metadata, chunkFolderPath: chunkFolderPath, directoryProviderStorageOcId: directoryProviderStorageOcId, errorCode: uploadErrorCode, errorDescription: uploadErrorDescription)
                     }
                 }
                 
@@ -191,6 +188,8 @@ extension NCNetworking {
         
         if errorCode == NSURLErrorCancelled || errorCode == NCGlobal.shared.errorRequestExplicityCancelled {
             
+            NCCommunication.shared.deleteFileOrFolder(chunkFolderPath) { (_, _, _) in }
+            
             NCManageDatabase.shared.deleteMetadata(predicate: NSPredicate(format: "ocId == %@", metadata.ocId))
             NCManageDatabase.shared.deleteChunks(account: metadata.account, ocId: metadata.ocId)
             NCUtilityFileSystem.shared.deleteFile(filePath: directoryProviderStorageOcId)