Kaynağa Gözat

test Unlock

Marino Faggiana 6 yıl önce
ebeveyn
işleme
f0b3f35d09
1 değiştirilmiş dosya ile 10 ekleme ve 0 silme
  1. 10 0
      PickerFileProvider/FileProvider.swift

+ 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()
+                }
+            }
         }
     }