slurp uses path; unidecode is improved and threadsafe

This commit is contained in:
Araq 2011-10-08 01:17:06 +02:00
commit e956abbadd
9 changed files with 76 additions and 48 deletions

View file

@ -942,7 +942,7 @@ proc semSlurp(c: PContext, n: PNode, flags: TExprFlags): PNode =
if sonsLen(n) == 2:
var a = expectStringArg(c, n, 0)
try:
var content = readFile(a.strVal)
var content = readFile(a.strVal.FindFile)
result = newStrNode(nkStrLit, content)
result.typ = getSysType(tyString)
result.info = n.info