-m better relative path recognition in abs_sym_path

This commit is contained in:
Stefan Schippers 2020-10-15 18:42:08 +02:00
parent 1c294ce31d
commit b88c4bab9e
1 changed files with 1 additions and 1 deletions

View File

@ -2659,7 +2659,7 @@ proc abs_sym_path {fname {ext {} } } {
}
if { $::OS ne {Windows}} {
# transform a/b/../c to a/c or a/b/c/.. to a/b
while {[regsub {[^/.]+/\.\./?} $fname {} fname] } {}
while {[regsub {([^/]*\.*[^./]+[^/]*)/\.\./?} $fname {} fname] } {}
}
# remove trailing '/'s to non empty path
regsub {([^/]+)/+$} $fname {\1} fname