Repository navigation
Conversation
Restoring a trash item whose trash-symlink no longer exists (already restored or purged) returned a bare *fs.PathError, surfacing as 500 CODE_INTERNAL instead of 404. Mirror PurgeRecycleItem's existing ErrNotExist -> errtypes.NotFound mapping.
The posix trashbin reads the .trashinfo file before anything else when restoring to the original location. The first restore removes that file, so restoring the same key again returned the bare *fs.PathError from os.ReadFile and the storage provider answered with a 500 instead of a 404. We now map ErrNotExist to errtypes.NotFound like the decomposedfs trashbin does. The shared recycle spec runs for the posix env too and covers this. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
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.
Restoring a trash item that was already restored or purged returned a bare
*fs.PathError, so the storage provider answered with a 500 instead of a 404. We now mapErrNotExisttoerrtypes.NotFoundin the decomposedfs trashbin (likePurgeRecycleItemalready does) and in the posix trashbin, which fails earlier when reading the.trashinfofile.The new recycle spec runs for both the decomposedfs and the posix env.
Assisted by Claude Code (claude-opus-5-5): it ported the change, wrote the posix fix and spec adaptation, and drafted this description.