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:
parent
06647c9d66
commit
b2b6b9fa30
1 changed files with 2 additions and 2 deletions
4
sh/e
4
sh/e
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue