marinofaggiana 5 年之前
父节点
当前提交
b628551ed1
共有 1 个文件被更改,包括 6 次插入4 次删除
  1. 6 4
      iOSClient/Networking/NCNetworking.swift

+ 6 - 4
iOSClient/Networking/NCNetworking.swift

@@ -200,14 +200,16 @@ import NCCommunication
         
         var metadatas = [tableMetadata]()
         var counter: Int = 0
-        var serverUrl: String = ""
         var isEncrypted: Bool = false
+        var listServerUrl = [String:Bool]()
 
         for file in files {
                         
-            if serverUrl != file.serverUrl {
-                serverUrl = file.serverUrl
-                isEncrypted = CCUtility.isFolderEncrypted(serverUrl, e2eEncrypted: file.e2eEncrypted, account: account)
+            if let key = listServerUrl[file.serverUrl] {
+                isEncrypted = key
+            } else {
+                isEncrypted = CCUtility.isFolderEncrypted(file.serverUrl, e2eEncrypted: file.e2eEncrypted, account: account)
+                listServerUrl[file.serverUrl] = isEncrypted
             }
             
             let metadata = self.convertFileToMetadata(file, isEncrypted: isEncrypted)