Browse Source

build closed

Marino Faggiana 6 years ago
parent
commit
edc31493fe

+ 13 - 13
PickerFileProvider/FileProviderExtension+Actions.swift

@@ -367,6 +367,19 @@ extension FileProviderExtension {
         let fileCoordinator = NSFileCoordinator()
         var error: NSError?
         
+        guard let tableDirectory = self.providerData.getTableDirectoryFromParentItemIdentifier(parentItemIdentifier) else {
+            completionHandler(nil, NSFileProviderError(.noSuchItem))
+            return
+        }
+        let serverUrl = tableDirectory.serverUrl
+            
+        // --------------------------------------------- Copy file here with security access
+            
+        if fileURL.startAccessingSecurityScopedResource() == false {
+            completionHandler(nil, NSFileProviderError(.noSuchItem))
+            return
+        }
+        
         // typefile directory ? (NOT PERMITTED)
         do {
             let attributes = try self.fileManager.attributesOfItem(atPath: fileURL.path)
@@ -381,19 +394,6 @@ extension FileProviderExtension {
             return
         }
         
-        guard let tableDirectory = self.providerData.getTableDirectoryFromParentItemIdentifier(parentItemIdentifier) else {
-            completionHandler(nil, NSFileProviderError(.noSuchItem))
-            return
-        }
-        let serverUrl = tableDirectory.serverUrl
-            
-        // --------------------------------------------- Copy file here with security access
-            
-        if fileURL.startAccessingSecurityScopedResource() == false {
-            completionHandler(nil, NSFileProviderError(.noSuchItem))
-            return
-        }
-            
         let fileName = self.createFileName(fileURL.lastPathComponent, directoryID: tableDirectory.directoryID, serverUrl: serverUrl)
         let fileNamePathDirectory = self.providerData.fileProviderStorageURL!.path + "/" + self.FILEID_IMPORT_METADATA_TEMP + tableDirectory.directoryID + fileName
             

+ 1 - 1
iOSClient/Brand/Picker.plist

@@ -19,7 +19,7 @@
 	<key>CFBundleShortVersionString</key>
 	<string>2.21.0</string>
 	<key>CFBundleVersion</key>
-	<string>00016</string>
+	<string>00017</string>
 	<key>NSAppTransportSecurity</key>
 	<dict>
 		<key>NSAllowsArbitraryLoads</key>

+ 1 - 1
iOSClient/Brand/PickerFileProvider.plist

@@ -19,7 +19,7 @@
 	<key>CFBundleShortVersionString</key>
 	<string>2.21.0</string>
 	<key>CFBundleVersion</key>
-	<string>00016</string>
+	<string>00017</string>
 	<key>NSExtension</key>
 	<dict>
 		<key>NSExtensionFileProviderDocumentGroup</key>

+ 1 - 1
iOSClient/Brand/Share.plist

@@ -19,7 +19,7 @@
 	<key>CFBundleShortVersionString</key>
 	<string>2.21.0</string>
 	<key>CFBundleVersion</key>
-	<string>00016</string>
+	<string>00017</string>
 	<key>NSAppTransportSecurity</key>
 	<dict>
 		<key>NSAllowsArbitraryLoads</key>

+ 1 - 1
iOSClient/Brand/iOSClient.plist

@@ -69,7 +69,7 @@
 		</dict>
 	</array>
 	<key>CFBundleVersion</key>
-	<string>00016</string>
+	<string>00017</string>
 	<key>FIREBASE_ANALYTICS_COLLECTION_DEACTIVATED</key>
 	<true/>
 	<key>Fabric</key>