changed the compiler's path handling; fixes #546

This commit is contained in:
Andreas Rumpf 2016-05-31 03:04:36 +02:00
commit 893be3a5a4
11 changed files with 32 additions and 17 deletions

View file

@ -262,15 +262,7 @@ proc processPath(path: string, info: TLineInfo,
else:
options.gProjectPath / path
try:
result = unixToNativePath(p % ["nimrod", getPrefixDir(),
"nim", getPrefixDir(),
"lib", libpath,
"home", removeTrailingDirSep(os.getHomeDir()),
"config", info.toFullPath().splitFile().dir,
"projectname", options.gProjectName,
"projectpath", options.gProjectPath])
if '~' in result:
result = result.replace("~", os.getHomeDir())
result = pathSubs(p, info.toFullPath().splitFile().dir)
except ValueError:
localError(info, "invalid path: " & p)
result = p