Marino Faggiana 7 years ago
parent
commit
87483a878e
1 changed files with 3 additions and 1 deletions
  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