-
Notifications
You must be signed in to change notification settings - Fork 914
File Provider Trash Changes #9323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR removes the trash deletion configuration feature for the macOS File Provider, transitioning to always allowing trash operations on the server side. The change simplifies the implementation by enabling supportsSyncingTrash at the domain level and removing user-facing controls for trash deletion.
Changes:
- Removed UI controls and backend logic for the "Allow deletion of items in Trash" setting
- Enabled server-side trash syncing support for macOS 13+ by setting
supportsSyncingTrash = YES - Simplified trash enumeration to only show locally deleted items (not remote trash items)
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| translations/client_en.ts | Removed translation entries for the deprecated trash deletion setting UI |
| translations/client_de.ts | Removed German translation for "General settings" label |
| src/gui/macOS/ui/FileProviderSettings.qml | Removed UI checkbox for trash deletion setting and "General settings" section |
| src/gui/macOS/fileproviderxpc_mac.mm | Removed XPC methods for querying and setting trash deletion state |
| src/gui/macOS/fileproviderxpc.h | Removed method declarations for trash deletion state management |
| src/gui/macOS/fileprovidersettingscontroller_mac.mm | Removed controller methods for managing trash deletion preferences |
| src/gui/macOS/fileprovidersettingscontroller.h | Removed Q_INVOKABLE methods and signals for trash deletion |
| src/gui/macOS/fileproviderdomainmanager.mm | Added supportsSyncingTrash = YES for macOS 13+ to enable server-side trash |
| shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/Services/ClientCommunicationService.swift | Removed XPC service methods for trash deletion setting |
| shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/Services/ClientCommunicationProtocol.h | Removed protocol methods for trash deletion |
| shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/FileProviderExtension.swift | Removed guard clause that blocked deletion of trashed items based on configuration |
| shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/FileProviderDomainDefaults.swift | Marked trashDeletionEnabled config key as obsolete and removed getter/setter |
| shell_integration/MacOSX/NextcloudFileProviderKit/Tests/NextcloudFileProviderKitTests/RemoteChangeObserverTests.swift | Added delay before test execution and reformatted assertion statements |
| shell_integration/MacOSX/NextcloudFileProviderKit/Tests/NextcloudFileProviderKitTests/EnumeratorTests.swift | Updated trash enumeration tests to expect empty results and no newly added items |
| shell_integration/MacOSX/NextcloudFileProviderKit/Sources/NextcloudFileProviderKit/Item/Item+Trash.swift | Improved logging with structured messages and added whitespace for readability |
| shell_integration/MacOSX/NextcloudFileProviderKit/Sources/NextcloudFileProviderKit/Item/Item+Modify.swift | Reformatted code and added duplicate guard statement (bug) |
| shell_integration/MacOSX/NextcloudFileProviderKit/Sources/NextcloudFileProviderKit/Enumeration/Enumerator.swift | Changed trash enumeration to return empty set instead of fetching remote trash items |
| shell_integration/MacOSX/NextcloudFileProviderKit/Sources/NextcloudFileProviderKit/Enumeration/Enumerator+Trash.swift | Simplified trash change enumeration to only detect remote permanent deletions |
| shell_integration/MacOSX/NextcloudFileProviderKit/Sources/NextcloudFileProviderKit/Database/FilesDatabaseManager.swift | Fixed log messages to use fileName instead of non-existent name property |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...tion/MacOSX/NextcloudFileProviderKit/Sources/NextcloudFileProviderKit/Item/Item+Modify.swift
Outdated
Show resolved
Hide resolved
...NextcloudFileProviderKit/Sources/NextcloudFileProviderKit/Enumeration/Enumerator+Trash.swift
Outdated
Show resolved
Hide resolved
f889e19 to
e0c1776
Compare
Signed-off-by: Iva Horn <iva.horn@nextcloud.com>
Signed-off-by: Iva Horn <iva.horn@nextcloud.com>
Signed-off-by: Iva Horn <iva.horn@nextcloud.com>
2f90317 to
a534f13
Compare
|
Artifact containing the AppImage: nextcloud-appimage-pr-9323.zip Digest: To test this change/fix you can download the above artifact file, unzip it, and run it. Please make sure to quit your existing Nextcloud app and backup your data. |
|



This is a port of the recent changes for 4.0.5 to the
masterbranch. They could not be cherry picked due to the intermittent migration of NextcloudFileProviderKit into this repository.See the individual commits for the separate changes!