diff options
author | marinofaggiana <marino@marinofaggiana.com> | 2020-07-14 12:09:15 +0300 |
---|---|---|
committer | marinofaggiana <marino@marinofaggiana.com> | 2020-07-14 12:09:15 +0300 |
commit | 7bc92b05a9dcbdd5cf1058111cebeb4bec165c2a (patch) | |
tree | 282d3d70353b91d1edac07e07ed9b108dd792ece /File Provider Extension | |
parent | 64c8a613195aeb736d470a1e9071a9e4630940d3 (diff) |
coding
Diffstat (limited to 'File Provider Extension')
-rw-r--r-- | File Provider Extension/FileProviderEnumerator.swift | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/File Provider Extension/FileProviderEnumerator.swift b/File Provider Extension/FileProviderEnumerator.swift index ce1c8f969..3d054fd79 100644 --- a/File Provider Extension/FileProviderEnumerator.swift +++ b/File Provider Extension/FileProviderEnumerator.swift @@ -222,8 +222,8 @@ class FileProviderEnumerator: NSObject, NSFileProviderEnumerator { if errorCode == 0 { DispatchQueue.global().async { NCManageDatabase.sharedInstance.convertNCCommunicationFilesToMetadatas(files, useMetadataFolder: true, account: account) { (metadataFolder, metadatasFolder, metadatas) in - let predicate = NSPredicate(format: "account == %@ AND serverUrl == %@", account, serverUrl) - NCManageDatabase.sharedInstance.updateMetadatasWithPredicate(predicate, metadatas: metadatas) + let metadatasResult = NCManageDatabase.sharedInstance.getMetadatas(predicate: NSPredicate(format: "account == %@ AND serverUrl == %@ AND status == %d", account, serverUrl, k_metadataStatusNormal)) + NCManageDatabase.sharedInstance.updateMetadatas(metadatas, metadatasResult: metadatasResult) for metadata in metadatasFolder { let serverUrl = metadata.serverUrl + "/" + metadata.fileNameView NCManageDatabase.sharedInstance.addDirectory(encrypted: metadata.e2eEncrypted, favorite: metadata.favorite, ocId: metadata.ocId, fileId: metadata.fileId, etag: nil, permissions: metadata.permissions, serverUrl: serverUrl, richWorkspace: metadata.richWorkspace, account: metadata.account) |