Skip to content

Conversation

@Flo-129
Copy link

@Flo-129 Flo-129 commented Dec 17, 2025

Summary

  • Add user-configurable option to enable/disable macOS Trash integration for FileProvider domains
  • When enabled: deleted files go to macOS Trash, server trash visible in Finder
  • When disabled: Finder shows "Delete Immediately" (files still recoverable from server)

Changes

  • New "Integrate macOS Trash" checkbox in Virtual Files settings (macOS 13.0+)
  • Per-account preference stored in NSUserDefaults
  • Domain reconfiguration via remove/add cycle (supportsSyncingTrash is read-only after creation)
  • Thread-safety improvements for concurrent domain registry access
  • Cleanup of unused socket communication code (superseded by XPC)

Test plan

  • Enable virtual files for an account
  • Toggle "Integrate macOS Trash" option on
  • Delete a file in Finder → verify it appears in macOS Trash
  • Open Trash in Finder → verify server trash contents are visible
  • Toggle option off → verify no crash occurs
  • Delete a file → verify "Delete Immediately" behavior

Requirements

  • macOS 13.0+ (option hidden on earlier versions)
  • Virtual files must be enabled for the account

@Flo-129 Flo-129 force-pushed the feature/macos-fileprovider-trash-sync branch 2 times, most recently from e7f29e2 to 2f103a7 Compare December 17, 2025 20:50
Add user-facing option to control NSFileProviderDomain.supportsSyncingTrash
property (macOS 13.0+). When enabled, deleted files appear in macOS Trash
and server trash contents are visible in Finder. When disabled, Finder
shows "Delete Immediately" option.

Changes:
- Add "Integrate macOS Trash" checkbox in FileProvider settings
- Store per-account trash sync preference in NSUserDefaults
- Implement domain reconfiguration (remove/add cycle) when setting changes
- Add thread-safety with QMutex for domain registry access
- Clean up unused socket-based communication code (replaced by XPC)

Signed-off-by: Flo-129 <Flo-129@users.noreply.github.com>
@i2h3
Copy link
Collaborator

i2h3 commented Dec 18, 2025

Thank you for your new pull request! I will bring this up for discussion internally. 🤔 Personally, I think it is fine to have a checkbox for that feature toggle but it contradicts our design guidelines on the other hand. 😵‍💫 I need to check in with the others.

@oskardotglobal
Copy link

Could ya'll approve workflows so we can test the builds from CI?

@github-actions
Copy link

Artifact containing the AppImage: nextcloud-appimage-pr-9264.zip

Digest: sha256:e7eddbec74c0a8cb15dc350e6f59af362c26cc88e549cdfb407538f81e1bec9b

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants