AI codebase review
fix: pin parent directory and verify owner/type before trashing Trash renamed the item by path after the confirmation dialog, so a parent directory swapped for a symlink since the scan (e.g. by another user, while an administrator cleans their home) redirected the move to an unrelated file. The parent is now opened once and the item is checked (owner and file type as scanned) and renamed relative to that fd. macOS volume trash directories now get the same ownership/symlink checks as freedesktop.org ones on Linux. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
ab3ff7b842
commit
3ec5bd7e65
@@ -11,4 +11,4 @@ const TrashName = "trash"
|
||||
func Reveal(string) error { return errors.New("not supported on this platform") }
|
||||
|
||||
// Trash is unsupported on this platform.
|
||||
func Trash(string) error { return errors.New("trash not supported on this platform") }
|
||||
func Trash(string, Expect) error { return errors.New("trash not supported on this platform") }
|
||||
|
||||
Reference in New Issue
Block a user