Marino Faggiana 6 жил өмнө
parent
commit
f0b3f35d09

+ 10 - 0
PickerFileProvider/FileProvider.swift

@@ -1007,6 +1007,16 @@ class FileProvider: NSFileProviderExtension, CCNetworkingDelegate {
                     NCManageDatabase.sharedInstance.deleteQueueUpload(path: metadataNetQueue!.path)
                 }
             }
+            
+        } else {
+            
+            let tasks = CCNetworking.shared().getUploadTasksExtensionSession()
+            if tasks!.count == 0 {
+                let records = NCManageDatabase.sharedInstance.getQueueUpload(predicate: NSPredicate(format: "account = %@ AND selector = %@ AND lock == true AND path != nil", account, selectorUploadFile))
+                if records != nil && records!.count > 0 {
+                    NCManageDatabase.sharedInstance.unlockAllQueueUploadInPath()
+                }
+            }
         }
     }