zsh:safe-remove(): Don't fail if already unmounted

This commit is contained in:
2020-11-15 01:22:20 +01:00
parent 4f182e9108
commit aed39d0f4c

View File

@@ -262,7 +262,7 @@ safe-remove() {
[[ -e "$1" ]] || return 1
sync
if ! udisksctl unmount -b "$1"; then
if mount | grep -q "$1" && ! udisksctl unmount -b "$1"; then
lsof "$1"
return 1
fi