mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-26 10:43:47 +08: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
|
@ -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 New Issue
Block a user