mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-25 04:13:08 +00: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:
parent
ffcfe73299
commit
d79a5a3152
1 changed files with 2 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue