Marino Faggiana %!s(int64=7) %!d(string=hai) anos
pai
achega
87483a878e
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      PickerFileProvider/FileProvider.swift

+ 3 - 1
PickerFileProvider/FileProvider.swift

@@ -980,7 +980,9 @@ class FileProvider: NSFileProviderExtension {
         }
         
         let fileNameLocalPath = directoryUser + "/" + fileName
-        _ = self.copyFile(path, toPath: fileNameLocalPath)
+        if self.copyFile(path, toPath: fileNameLocalPath) != nil {
+            return
+        }
         
         let task = ocNetworking?.uploadFileNameServerUrl(serverUrl+"/"+fileName, fileNameLocalPath: fileNameLocalPath, communication: CCNetworking.shared().sharedOCCommunicationExtensionUpload(fileName), success: { (fileID, etag, date) in