1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-11-05 06:49:03 -08:00

fix handling of root directory

This commit is contained in:
Connor Olding 2021-10-11 19:53:46 -07:00
parent 06647c9d66
commit b2b6b9fa30

4
sh/e
View file

@ -42,8 +42,8 @@ e() { ### @-
d="$f"
while [ "${d%/*}" != "$d" ]; do
d="${d%/*}"
[ -w "$d" ] && break
[ -e "$d" ] && { needroot=1; break; }
[ -w "$d/" ] && break
[ -e "$d/" ] && { needroot=1; break; }
done
[ $needroot = 1 ] && break