Repository navigation
Conversation
Trash items through NSFileManager and keep their original location in an app-data index, so the Recycle Bin lists them even when macOS blocks reading ~/.Trash; offer to open System Settings when it does. Size trashed directories lazily so a large trash cannot stall the listing, and skip Finder's .DS_Store and .localized files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolved / Related Issues
Part of the macOS port. macOS protects listing
~/.Trash, not moving items into it, so without Full Disk Access the Recycle Bin looked empty.trashItemAtURL; the original location, deletion time and size go into an app-data index (trash-index.tsv), so they list without Full Disk Access. With access, the rest of~/.Trashis merged in.ITrashService.IsListingRestricted(), always false on Linux)..DS_Storeand.localizedare skipped.Limitation: items trashed by the previous macOS code kept their origin in
TrashIndex/sidecars, which are no longer read; they show "original location unknown".Steps used to test these changes
dotnet test --project tests/Files.Platform.Tests/Files.Platform.Tests.csproj --no-build --filter "FullyQualifiedName~Trash": the 3 newMacOSTrashServiceTestspass; the remaining failures on macOS are the Linux-only trash tests that fail identically on main.🤖 Generated with Claude Code