Merge pull request #4502 from SSPkrolik/findexe-posix-fix
Fixed findExe behaviour on Linux with symlinks relative paths
This commit is contained in:
commit
38307a1f33
1 changed files with 4 additions and 1 deletions
|
|
@ -592,7 +592,10 @@ when declared(getEnv) or defined(nimscript):
|
|||
r = newString(len+1)
|
||||
len = readlink(x, r, len)
|
||||
setLen(r, len)
|
||||
x = r
|
||||
if isAbsolute(r):
|
||||
x = r
|
||||
else:
|
||||
x = parentDir(x) / r
|
||||
else:
|
||||
break
|
||||
return x
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue