diff --git a/lib/osfiles.s7i b/lib/osfiles.s7i index 6084a783..13f5c9e6 100644 --- a/lib/osfiles.s7i +++ b/lib/osfiles.s7i @@ -766,6 +766,7 @@ const func string: toAbsPath (in string: basePath, in string: path) is func else absolutePath := getcwd & "/" & basePath & "/" & path; end if; + absolutePath := replace(absolutePath, "/./", "/"); dotdotPos := pos(absolutePath, "/.."); while dotdotPos <> 0 do slashPos := rpos(absolutePath, '/', pred(dotdotPos)); @@ -787,7 +788,6 @@ const func string: toAbsPath (in string: basePath, in string: path) is func dotdotPos := pos(absolutePath, "/..", succ(dotdotPos)); end if; end while; - absolutePath := replace(absolutePath, "/./", "/"); if endsWith(absolutePath, "/.") then if absolutePath = "/." then absolutePath := "/";