1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-05-18 01:53:22 -07: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