diff --git a/internal/trash/trash.go b/internal/trash/trash.go index f2779d7..5b133c3 100644 --- a/internal/trash/trash.go +++ b/internal/trash/trash.go @@ -161,6 +161,9 @@ func TrashFile(trashDir, name string) error { // TODO: write across filesystems if err := os.Rename(name, out_path); err != nil { + if strings.Contains(err.Error(), "invalid cross-device link") { + return fmt.Errorf("not trashing file '%s': On different filesystem from trash directory", name) + } return err }