Repository navigation
feat: browse the Recycle Bin, restore items and delete them permanently - #144
Merged
Merged
Conversation
nextestudios
force-pushed
the
feature/26-recycle-bin
branch
from
September 27, 2026 05:01
3e511c8 to
701a2fe
Compare
- RecycleBinLocation (virtual) and IRecycleBin contract in Core. - WindowsRecycleBin reads the current user's $Recycle.Bin on fixed and removable drives ($I v1/v2 metadata). Restore renames $R back to the original path, recreating missing folders and never overwriting; the original path is untrusted and must be absolute, normalized, on the same drive and made of valid names. Permanent delete never follows links. - Home lists the bin with the Windows icon (shell PIDL); items show the original folder and deletion date. South/A or North offers Restore and Delete permanently (confirmation starts on Cancel); marking works. - Journey test with an in-memory bin; Windows integration tests recycle and restore a temp file in the real bin and reject crafted metadata. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
nextestudios
force-pushed
the
feature/26-recycle-bin
branch
from
September 27, 2026 05:04
701a2fe to
c5befbc
Compare
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.
Summary
RecycleBinLocation(virtual, distinct fromPhysicalLocation) and anIRecycleBincontract in Core.WindowsRecycleBin(Infrastructure.Windows/Shell) reads the current user'sX:\$Recycle.Bin\<SID>on fixed and removable drives, parsing the$Imetadata (v1 and v2) for the original path, size and deletion date.$R…back to the original path (same volume), recreating missing folders. It never overwrites: if something is already there it fails with a clear message and the item stays in the bin...), on the same drive as the bin and made of valid Windows names. Otherwise the item is listed as blocked and can only be deleted for good. Ids must be a$R…directly inside a known bin folder.$R(never following links, reusing the existing permanent-delete helper) and$I.$Recycle.Bindirectly instead of going through the Shell namespace so restore is deterministic and never shows Windows conflict dialogs. The only Shell API used is the bin icon (SHParseDisplayName + SHGFI_PIDL).Tests
$Ifiles checks that relative,..and other-drive paths are refused, conflicts never overwrite, and ids outside the bin are rejected. The recycle bin icon comes back from the shell.Closes #26
🤖 Generated with Claude Code