mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-31 20:31:19 -03:00
Funced: Make removal safer, take two
Now we try to remove the file and then the directory, without forcing anything, showing any (quite unexpected) error to the user, once.
This commit is contained in:
@@ -124,8 +124,7 @@ function funced --description 'Edit function definition'
|
||||
break
|
||||
end
|
||||
set -l stat $status
|
||||
# Only forcibly delete files to limit possible damage is tmpdir is set to something weird
|
||||
rm -f $tmpname >/dev/null
|
||||
rm -r $tmpdir >/dev/null
|
||||
rm $tmpname >/dev/null
|
||||
and rmdir $tmpdir >/dev/null
|
||||
return $stat
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user