summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Veresov <aleksey@veresov.pro>2020-12-06 22:05:08 +0300
committerAleksey Veresov <aleksey@veresov.pro>2020-12-06 22:05:08 +0300
commit217fc658ff15c7dc00e61d90b13cd84b0adc63b1 (patch)
tree7420857a95bc5ec8607f8ebaa129ff135ef48449
parentae3ad126181f6f974941190848ed9532edbfc6c5 (diff)
downloadvsvs-217fc658ff15c7dc00e61d90b13cd84b0adc63b1.tar
vsvs-217fc658ff15c7dc00e61d90b13cd84b0adc63b1.tar.xz
vsvs-217fc658ff15c7dc00e61d90b13cd84b0adc63b1.zip
.
-rw-r--r--vsvs-locate2
1 files changed, 1 insertions, 1 deletions
diff --git a/vsvs-locate b/vsvs-locate
index 009eccc..5015529 100644
--- a/vsvs-locate
+++ b/vsvs-locate
@@ -4,7 +4,7 @@
after () { test -z "${2##*$1*}" && echo -n "${2#*$1}"; }
test "${1::1}" == "/" && path=$base || path="."
lastpath=$1
-until test -n "$lastpath" || test -f "$path"
+until test -z "$lastpath" || test -f "$path"
do
path="$path/${lastpath%%/*}"
lastpath=$(after / "$lastpath")