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.

@github-actions
Copy link

github-actions bot commented Jan 1, 2026

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants