diff --git a/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/FileProviderExtension.swift b/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/FileProviderExtension.swift index 6d5c29b73..9e6b8e3c7 100644 --- a/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/FileProviderExtension.swift +++ b/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/FileProviderExtension.swift @@ -155,9 +155,9 @@ class FileProviderExtension: NSObject, NSFileProviderReplicatedExtension, NKComm assert(ncAccount != nil) - if true { // TODO: only run this if we need to refresh root container and it is the first ever sync - // This refreshes the entire structure of the FileProvider and calls enumerateItems - // rather than enumerateChanges in the enumerator + if !NextcloudFilesDatabaseManager.shared.anyItemMetadatasForAccount(ncAccount!.ncKitAccount) { + // This refreshes the entire structure of the FileProvider and calls + // enumerateItems rather than enumerateChanges in the enumerator NSLog("Signalling manager for user %@ at server %@ to reimport everything", ncAccount!.username, ncAccount!.serverUrl) fpManager.reimportItems(below: .rootContainer, completionHandler: {_ in }) return