Commit Graph

132 Commits

Author SHA1 Message Date
28421ec96a fix: Fixed too long socket paths (max 104 characters).
Signed-off-by: Iva Horn <iva.horn@nextcloud.com>
2025-12-18 10:29:40 +01:00
09005a0e94 fix(file-provider): App group container lookup API change in NextcloudFileProviderKit.
Signed-off-by: Iva Horn <iva.horn@nextcloud.com>
2025-12-18 10:29:40 +01:00
d7a6d7c881 chore(macOS): Removed obsolete values from Info.plist
Signed-off-by: Iva Horn <iva.horn@nextcloud.com>
2025-12-18 10:29:40 +01:00
e8bd02e5b5 fix(file-provider): Sync state for excluded lock files.
- Added debug logging to file provider extension about its sync actions.
- Added debug logging to file provider extension about its sync state reported to the main app through the socket.
- Added debug logging to the main app about the sync state received from a file provider extension through the socket.
- Updated sync action management to not consider the exclusion of a lock file as an error.

Signed-off-by: Iva Horn <iva.horn@nextcloud.com>
2025-12-03 17:40:53 +01:00
d3c2cb6086 fix(file-provider): Root container enumeration to process remote updates correctly.
Signed-off-by: Iva Horn <iva.horn@nextcloud.com>
2025-11-21 16:40:47 +01:00
3220e9ec88 fix(file-provider): Fix #8914 by omitting the faulty NSFileProviderRequest argument on enumerator request.
Signed-off-by: Iva Horn <iva.horn@nextcloud.com>
2025-10-23 16:51:53 +02:00
2186edeeb7 feat: Logging NSFileProviderRequest.
Signed-off-by: Iva Horn <iva.horn@nextcloud.com>
2025-10-20 10:59:00 +02:00
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
92f13d4be8 fix(file-provider): Updated logging calls in extension implementation.
Signed-off-by: Iva Horn <iva.horn@icloud.com>
2025-10-13 10:17:09 +02:00
57fbc2a271 feat: Improved logging of file provider extension implementation.
Signed-off-by: Iva Horn <iva.horn@icloud.com>
2025-10-01 11:56:54 +02:00
6c5ee7c14a feat: Replaced Unified Logging System with Custom Solution.
- Removed explicit reference to NextcloudKit dependency which implicitly is pulled in already by NextcloudFileProviderKit.
- Consolidated some source code files into their respective view controllers in the file provider UI extension.

Signed-off-by: Iva Horn <iva.horn@icloud.com>
2025-09-24 13:23:28 +02:00
6e2db6f08b feat: Configured NextcloudKit based on file provider domain identifier.
Signed-off-by: Iva Horn <iva.horn@icloud.com>
2025-09-17 08:15:44 +02:00
0b2ead8243 feat: Implemented reauthentication in file provider UI extension (#8617).
Signed-off-by: Iva Horn <iva.horn@icloud.com>
2025-09-17 08:15:44 +02:00
9711bbfdee fix(FileProviderExt): do not report syncing state when trying to delete trash items
Trying to delete items from the trash with the "Allow deletion of items
in Trash" setting unticked would previously result in the sync state
being stuck in the "Syncing" state.

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
2025-08-21 17:37:49 +02:00
666a089d29 fix(shell_integration/macOS/FileProviderExt): Conform to changes in MaterialisedEnumerationObserver
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2025-06-17 09:11:59 +02:00
866cbe3af9 fix(shell_integration/macOS/FileProviderExt): Remove fast enumeration use in enumerator
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2025-06-02 15:15:32 +02:00
51df83bcdb feat(shell_integration/macOS/FileProviderExt): Adapt to async stored item fetching from NCFPK 2.1
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2025-05-28 08:52:47 +02:00
ef180f88ee feat(shell_integration/macOS/FileProviderExt): Await ignored files before proceeding with create/modify/delete
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2025-05-15 12:10:44 +02:00
cc4bc8fa98 feat(shell_integration/macOS/FileProviderExt): Pass ignored files matcher when creating/modifying/deleting items
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2025-05-15 12:10:44 +02:00
f94ee2142f feat(shell_integration/macOS/FileProviderExt): Parse received ignored files to set up IgnoredFilesMatcher
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2025-05-15 12:10:44 +02:00
c6254b57fb fix(shell_integration/macOS/FileProviderExt): Use NSError-based deletion rejected builder method
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2025-05-14 16:51:49 +02:00
8a7fd5651b fix(shell_integration/macOS/FileProviderExt): Make item filename public during rejected deletion
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2025-05-14 16:51:49 +02:00
aab2728a84 feat(shell_integration/macOS/FileProviderExt): Prevent deletion of trashed items when config flag is set
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2025-05-14 16:51:49 +02:00
ef783d7b11 fix(shell_integration/macOS/FileProviderExt): Correctly build NSFileProviderErrors
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2025-05-09 17:40:41 +02:00
52655ca9ce feat(shell_integration/macOS/FileProviderExt): Also use specific dbManager for local file handling
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2025-05-06 09:45:47 +02:00
bc111b1e48 feat(shell_integration/macOS/FileProviderExt): Pass dbManager into standard FileProviderExtension methods
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2025-05-06 09:45:47 +02:00
c75c4c46a3 feat(shell_integration/macOS/FileProviderExt): Configure specific instance of FilesDatabaseManager for account
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2025-05-06 09:45:47 +02:00
00994aa9e8 docs(reuse): Migrate to SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2025-04-16 15:19:26 +02:00
ee3ae980a8 shell_integration/macOS/FileProviderExt: Do not report enumeration-related sync state
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2025-03-28 10:50:33 +01:00
11137e572d shell_integration/macOS/FileProviderExt: Do not delete an item twice in FileProviderExtension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2025-02-06 12:24:09 +01:00
a08a425083 shell_integration/macOS/FileProviderExt: Adapt to API changes in NextcloudFileProviderKit changes in 2.0
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2025-02-06 12:24:09 +01:00
4012d43bb9 Do not provide items if account is not set up correctly
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-09-12 09:50:50 +02:00
1283284572 Remove ncAccount usages removed in NCFPK API
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-07-29 16:52:37 +08:00
92f42bc16d Lock and unlock when accessing sync actions in FileProviderExt to protect against possible races
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-07-23 14:06:29 +08:00
939d67bfcc Set self as listener for Enumerator in FileProviderExt
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-07-23 14:06:29 +08:00
617ca1a153 Add conformance to NextcloudFileProviderKit's EnumerationListener protocol in FileProviderExt
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-07-23 14:06:28 +08:00
0c78594481 Track sync actions in main FileProviderExt procedures
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-07-23 14:06:28 +08:00
3f3f478f6a Add method to remove finished sync action in FileProviderExt
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-07-23 14:06:28 +08:00
c189f2952f Add method to mark action as error sync action in FileProviderExt
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-07-23 14:06:28 +08:00
3e6b20713e Add method to insert new sync action in FileProviderExt
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-07-23 14:06:28 +08:00
5237822221 Add sets for actions, to be able to track multiple actions
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-07-23 14:06:28 +08:00
e7a164d312 Remove unused urlsession stuff in FileProviderExtension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-07-19 16:24:21 +08:00
73fde5065d Adapt to remoteInterface changes in NCFPK
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-07-19 16:24:21 +08:00
68370ade88 Add change observer from NCFPK
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-04-17 16:15:05 +08:00
6a64248ff6 Always signal enumerator after errors to try and recover from what the error might have been
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-04-17 16:15:04 +08:00
33e2c084a5 Provide NCFPK enumerator with extension domain
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-04-17 16:15:04 +08:00
c082c446c1 Fix passing of wrong item into item.modify
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-04-17 16:15:04 +08:00
dab28f20f4 Improve logging in delete item procedure of FPExt
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-04-17 16:15:04 +08:00
485b07a805 Use NCFPK item modify method
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-04-17 16:15:03 +08:00
c9a131736a Use NCFPK Item.create in createItem
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-04-17 16:15:03 +08:00