Marino Faggiana 6 years ago
parent
commit
fb25658ef2
2 changed files with 2 additions and 2 deletions
  1. 1 1
      PickerFileProvider/FileProvider.swift
  2. 1 1
      iOSClient/Networking/CCNetworking.m

+ 1 - 1
PickerFileProvider/FileProvider.swift

@@ -65,7 +65,7 @@ class FileProvider: NSFileProviderExtension, CCNetworkingDelegate {
                 timerUpload = Timer.init(timeInterval: TimeInterval(k_timerProcessAutoDownloadUpload), repeats: true, block: { (Timer) in
                     
                     let tasks = CCNetworking.shared().getUploadTasksExtensionSession()
-                    if tasks == nil {
+                    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()

+ 1 - 1
iOSClient/Networking/CCNetworking.m

@@ -429,7 +429,7 @@
 
 - (NSArray *)getUploadTasksExtensionSession
 {
-    __block NSArray *tasks;
+    __block NSArray *tasks = [NSArray new];
     [[self sessionUploadExtension] getTasksWithCompletionHandler:^(NSArray *dataTasks, NSArray *uploadTasks, NSArray *downloadTasks) {
         tasks =  uploadTasks;
     }];