diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2018-05-17 15:21:22 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-05-17 15:21:22 +0200 |
commit | bf6c2c5ccfd33cc8aab53b98dbce0619f8633d84 (patch) | |
tree | bafa67febeed93ac44278d593ca26b1cb22ea32d /compiler/pragmas.nim | |
parent | 2a7fc84c86c48c6ca6354c8c2f9232c3f1a0b049 (diff) | |
download | Nim-bf6c2c5ccfd33cc8aab53b98dbce0619f8633d84.tar.gz |
preparations of making compiler/msgs.nim free of global variables
Diffstat (limited to 'compiler/pragmas.nim')
-rw-r--r-- | compiler/pragmas.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/pragmas.nim b/compiler/pragmas.nim index 27c720d09..19431613c 100644 --- a/compiler/pragmas.nim +++ b/compiler/pragmas.nim @@ -404,7 +404,7 @@ proc relativeFile(c: PContext; n: PNode; ext=""): string = var s = expectStrLit(c, n) if ext.len > 0 and splitFile(s).ext == "": s = addFileExt(s, ext) - result = parentDir(n.info.toFullPath) / s + result = parentDir(toFullPath(c.config, n.info)) / s if not fileExists(result): if isAbsolute(s): result = s else: @@ -426,7 +426,7 @@ proc processCompile(c: PContext, n: PNode) = if it.kind in {nkPar, nkTupleConstr} and it.len == 2: let s = getStrLit(c, it, 0) let dest = getStrLit(c, it, 1) - var found = parentDir(n.info.toFullPath) / s + var found = parentDir(toFullPath(c.config, n.info)) / s for f in os.walkFiles(found): let nameOnly = extractFilename(f) var cf = Cfile(cname: f, @@ -435,7 +435,7 @@ proc processCompile(c: PContext, n: PNode) = extccomp.addExternalFileToCompile(c.config, cf) else: let s = expectStrLit(c, n) - var found = parentDir(n.info.toFullPath) / s + var found = parentDir(toFullPath(c.config, n.info)) / s if not fileExists(found): if isAbsolute(s): found = s else: |