Fix IOErrors
This commit is contained in:
parent
1b645dd5b2
commit
bb881a2e65
2 changed files with 7 additions and 1 deletions
|
|
@ -476,6 +476,9 @@ proc c2nim(fl, outfile: string, c2nimConfig: c2nimConfigObj) =
|
||||||
cfile = "temp-$#.c" % [outfile.extractFilename()]
|
cfile = "temp-$#.c" % [outfile.extractFilename()]
|
||||||
writeFile(cfile, runCtags(file))
|
writeFile(cfile, runCtags(file))
|
||||||
|
|
||||||
|
while not fileExists(cfile):
|
||||||
|
sleep(10)
|
||||||
|
|
||||||
if c2nimConfig.defines and (c2nimConfig.preprocess or c2nimConfig.ctags):
|
if c2nimConfig.defines and (c2nimConfig.preprocess or c2nimConfig.ctags):
|
||||||
prepend(cfile, getDefines(file, c2nimConfig.inline))
|
prepend(cfile, getDefines(file, c2nimConfig.inline))
|
||||||
|
|
||||||
|
|
@ -531,6 +534,9 @@ proc c2nim(fl, outfile: string, c2nimConfig: c2nimConfigObj) =
|
||||||
cmd = "cmd /c " & cmd
|
cmd = "cmd /c " & cmd
|
||||||
discard execProc(cmd)
|
discard execProc(cmd)
|
||||||
|
|
||||||
|
while not fileExists(outfile):
|
||||||
|
sleep(10)
|
||||||
|
|
||||||
if c2nimConfig.preprocess or c2nimConfig.ctags:
|
if c2nimConfig.preprocess or c2nimConfig.ctags:
|
||||||
try:
|
try:
|
||||||
removeFile(cfile)
|
removeFile(cfile)
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ skipDirs = @["tests"]
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
|
|
||||||
requires "nim >= 0.17.2", "c2nim >= 0.9.13"
|
requires "nim >= 0.17.0", "c2nim >= 0.9.13"
|
||||||
|
|
||||||
bin = @["nimgen"]
|
bin = @["nimgen"]
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue