Merge pull request #4502 from SSPkrolik/findexe-posix-fix

Fixed findExe behaviour on Linux with symlinks relative paths
This commit is contained in:
Andreas Rumpf
2016-07-20 16:11:48 +02:00
committed by GitHub

View File

@@ -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