diff options
author | marinofaggiana <marino@marinofaggiana.com> | 2020-07-13 17:58:16 +0300 |
---|---|---|
committer | marinofaggiana <marino@marinofaggiana.com> | 2020-07-13 17:58:16 +0300 |
commit | e6dcffcb52ffb831573f1a92958f4b489dbfe87a (patch) | |
tree | e9df675d4c433351b2e727d67c197d0b07e3d4a9 /File Provider Extension | |
parent | 215802205c451beda04c60fdd0a047c41fef7386 (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 ac73a3014..9d0230879 100644 --- a/File Provider Extension/FileProviderEnumerator.swift +++ b/File Provider Extension/FileProviderEnumerator.swift @@ -262,8 +262,8 @@ class FileProviderEnumerator: NSObject, NSFileProviderEnumerator { if errorCode == 0 { DispatchQueue.global().async { NCManageDatabase.sharedInstance.convertNCCommunicationFilesToMetadatas(files, useMetadataFolder: false, 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", fileProviderData.sharedInstance.account, serverUrl, k_metadataStatusNormal), page: page, limit: fileProviderData.sharedInstance.itemForPage, sorted: "fileName", ascending: true) + 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: nil, account: metadata.account) |