fix #4568
This commit is contained in:
parent
1b55f57b26
commit
d00a2536c4
1 changed files with 6 additions and 2 deletions
|
|
@ -400,8 +400,12 @@ proc relativeFile(c: PContext; n: PNode; ext=""): string =
|
||||||
s = addFileExt(s, ext)
|
s = addFileExt(s, ext)
|
||||||
result = parentDir(n.info.toFullPath) / s
|
result = parentDir(n.info.toFullPath) / s
|
||||||
if not fileExists(result):
|
if not fileExists(result):
|
||||||
if isAbsolute(s): result = s
|
if isAbsolute(s):
|
||||||
else: result = findFile(s)
|
result = s
|
||||||
|
else:
|
||||||
|
result = findFile(s)
|
||||||
|
if result.len == 0:
|
||||||
|
result = s
|
||||||
|
|
||||||
proc processCompile(c: PContext, n: PNode) =
|
proc processCompile(c: PContext, n: PNode) =
|
||||||
let found = relativeFile(c, n)
|
let found = relativeFile(c, n)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue