fixes #765
This commit is contained in:
parent
4ebd7d0744
commit
4886cde781
1 changed files with 4 additions and 2 deletions
|
|
@ -7,7 +7,7 @@
|
||||||
# distribution, for details about the copyright.
|
# distribution, for details about the copyright.
|
||||||
#
|
#
|
||||||
|
|
||||||
import ast, types, msgs, osproc, streams, options, idents, securehash
|
import ast, types, msgs, os, osproc, streams, options, idents, securehash
|
||||||
|
|
||||||
proc readOutput(p: Process): string =
|
proc readOutput(p: Process): string =
|
||||||
result = ""
|
result = ""
|
||||||
|
|
@ -51,7 +51,9 @@ proc opGorge*(cmd, input, cache: string): string =
|
||||||
|
|
||||||
proc opSlurp*(file: string, info: TLineInfo, module: PSym): string =
|
proc opSlurp*(file: string, info: TLineInfo, module: PSym): string =
|
||||||
try:
|
try:
|
||||||
let filename = file.findFile
|
var filename = parentDir(info.toFullPath) / file
|
||||||
|
if not fileExists(filename):
|
||||||
|
filename = file.findFile
|
||||||
result = readFile(filename)
|
result = readFile(filename)
|
||||||
# we produce a fake include statement for every slurped filename, so that
|
# we produce a fake include statement for every slurped filename, so that
|
||||||
# the module dependencies are accurate:
|
# the module dependencies are accurate:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue