diff --git a/minimal/do b/minimal/do index 258a25e..557c433 100755 --- a/minimal/do +++ b/minimal/do @@ -196,7 +196,7 @@ _normpath() fi set -f IFS=/ - for d in $path; do + for d in ${path%/}; do #echo "NP out='$out' d='$d'" >&2 if [ "$d" = ".." ]; then out=$(_updir "${out%/}")/ diff --git a/t/shelltest.od b/t/shelltest.od index 948a36c..c911b89 100644 --- a/t/shelltest.od +++ b/t/shelltest.od @@ -46,6 +46,15 @@ quiet_stderr() fi } +( + x="/a/b/c/" + IFS=/ + f() { + [ "$2" = "a" ] || fail 2 + [ "$#" = "4" ] || warn 2a + } + f $x +) name=foo.o.o ext=.o