path canonicalization and proper project relative paths

This commit is contained in:
Zahary Karadjov 2011-12-09 04:40:59 +02:00
commit e4e74034c2
9 changed files with 61 additions and 47 deletions

View file

@ -796,7 +796,7 @@ proc evalInclude(c: PContext, n: PNode): PNode =
addSon(result, n)
for i in countup(0, sonsLen(n) - 1):
var f = getModuleFile(n.sons[i])
var fileIndex = includeFilename(f)
var fileIndex = f.fileInfoIdx
if ContainsOrIncl(c.includedFiles, fileIndex):
GlobalError(n.info, errRecursiveDependencyX, f)
addSon(result, semStmt(c, gIncludeFile(f)))