From 9f0899da126124a76357a234d1499397bd42b1eb Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Fri, 5 Aug 2016 15:14:08 +0200 Subject: [PATCH] fixes a regression involving the .compile and .link pragmas --- compiler/pragmas.nim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler/pragmas.nim b/compiler/pragmas.nim index 781aab687..1f93f5317 100644 --- a/compiler/pragmas.nim +++ b/compiler/pragmas.nim @@ -401,7 +401,9 @@ proc relativeFile(c: PContext; n: PNode; ext=""): string = result = parentDir(n.info.toFullPath) / s if not fileExists(result): if isAbsolute(s): result = s - else: result = findFile(s) + else: + result = findFile(s) + if result.len == 0: result = s proc processCompile(c: PContext, n: PNode) = let found = relativeFile(c, n)