Fix relative . or .. symlinks
This commit is contained in:
parent
d54039a09b
commit
2665af78b6
@ -27,13 +27,12 @@ while [ -n "$left" ]; do
|
||||
|
||||
case "$seg" in
|
||||
.)
|
||||
# /foo/a -> . will become /foo
|
||||
result="${result%/*}"
|
||||
# Just ignore this segment
|
||||
continue
|
||||
;;
|
||||
..)
|
||||
# /foo/bar/a -> .. will become /foo
|
||||
result="${result%/*/*}"
|
||||
# Eat a segment off result
|
||||
result="${result%/*}"
|
||||
continue
|
||||
;;
|
||||
esac
|
||||
|
Loading…
Reference in New Issue
Block a user