Files
mapsize/internal/platform/ops_other.go
T
Andy DixonandClaude Opus 5.5 3ec5bd7e65 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>
2026-10-02 10:58:38 +01:00

15 lines
418 B
Go

//go:build !linux && !darwin && !windows
package platform
import "errors"
// TrashName is the user-facing name of the trash.
const TrashName = "trash"
// Reveal is unsupported on this platform.
func Reveal(string) error { return errors.New("not supported on this platform") }
// Trash is unsupported on this platform.
func Trash(string, Expect) error { return errors.New("trash not supported on this platform") }