nextcloud-desktop/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt
Jyrki Gadinger ff43776cb7 fix(file-provider): report a different error if database is not ready
As per [the docs for `NSFileProviderReplicatedExtension
item(for:request:completionHandler:)`][1], the system will automatically
retry calling the method if the error is not one of `.notAuthenticated`,
`.serverUnreachable`, or `.noSuchItem`.

From my observations it seems that if the error `.cannotSynchronize` is
returned for the root container (i.e.
`NSFileProviderRootContainerItemIdentifier`), the system/file provider
framework just ends up deleting the newly created sync directory inside
`~/Library/CloudStorage`.  This broke the entry in the Finder sidebar.

After changing the error to `.notAuthenticated` (which is semantically
wrong, but alas), I now could disable/enable the File Provider as often
as I wanted without the Finder sidebar entry to ever break due to the
directory having been removed previously ...  Strange, this.

[1]: https://developer.apple.com/documentation/fileprovider/nsfileproviderreplicatedextension/item(for:request:completionhandler:)#Discussion

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
2025-10-15 16:41:10 +02:00
..
Assets.xcassets feat: Branded file provider extension SF Symbol. 2025-10-07 12:53:30 +02:00
Extensions feat: Replaced Unified Logging System with Custom Solution. 2025-09-24 13:23:28 +02:00
Services fix: Improved one logging call. 2025-10-06 18:31:50 +02:00
FileProviderDomainDefaults.swift feat: Replaced Unified Logging System with Custom Solution. 2025-09-24 13:23:28 +02:00
FileProviderExt-Bridging-Header.h docs(reuse): Migrate to SPDX header 2025-04-16 15:19:26 +02:00
FileProviderExt.entitlements Added missing network entitlement to FileProviderExt 2023-05-12 13:21:15 +08:00
FileProviderExt.entitlements.license docs(reuse): Migrate to SPDX header 2025-05-07 09:28:53 +02:00
FileProviderExtension.swift fix(file-provider): report a different error if database is not ready 2025-10-15 16:41:10 +02:00
FileProviderExtension+ClientInterface.swift feat: Replaced Unified Logging System with Custom Solution. 2025-09-24 13:23:28 +02:00
FileProviderExtension+CustomActions.swift feat: Replaced Unified Logging System with Custom Solution. 2025-09-24 13:23:28 +02:00
FileProviderExtension+Thumbnailing.swift feat: Replaced Unified Logging System with Custom Solution. 2025-09-24 13:23:28 +02:00
FileProviderMaterialisedEnumerationObserver.swift docs(reuse): Migrate to SPDX header 2025-04-16 15:19:26 +02:00
FileProviderSocketLineProcessor.swift feat: Replaced Unified Logging System with Custom Solution. 2025-09-24 13:23:28 +02:00
Info.plist feat: Branded file provider extension SF Symbol. 2025-10-07 12:53:30 +02:00
Info.plist.license docs(reuse): Migrate to SPDX header 2025-05-07 09:28:53 +02:00
Keychain.swift feat: Replaced Unified Logging System with Custom Solution. 2025-09-24 13:23:28 +02:00
Localizable.xcstrings feat(file-provider): Integrated localizations from Transifex. 2025-10-07 14:28:44 +02:00