mirror of
https://github.com/tw93/Mole.git
synced 2026-02-04 16:49:41 +00:00
fix(analyze): improve deletion safety and UI clarity
- Update UI status to 'Moving to Trash...' for clarity - Use os.Lstat instead of os.Stat to correctly handle broken symlinks during deletion checks
This commit is contained in:
@@ -80,8 +80,8 @@ func (e *multiDeleteError) Error() string {
|
||||
// trashPathWithProgress moves a path to Trash using Finder.
|
||||
// This allows users to recover accidentally deleted files.
|
||||
func trashPathWithProgress(root string, counter *int64) (int64, error) {
|
||||
// Verify path exists.
|
||||
info, err := os.Stat(root)
|
||||
// Verify path exists (use Lstat to handle broken symlinks).
|
||||
info, err := os.Lstat(root)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user