Fix a build issue when confutils is used together with the memfiles module

This commit is contained in:
Zahary Karadjov 2019-11-08 15:03:55 +00:00
parent 0e42c65951
commit c9d823f217
No known key found for this signature in database
GPG Key ID: C8936F8A3073D609

View File

@ -418,7 +418,7 @@ proc parseCmdArg*(T: type InputFile, p: TaintedString): T =
when not defined(nimscript): when not defined(nimscript):
try: try:
let f = open(p.string, fmRead) let f = system.open(p.string, fmRead)
close f close f
except IOError: except IOError:
raise newException(ValueError, "File not accessible") raise newException(ValueError, "File not accessible")
@ -435,7 +435,7 @@ proc parseCmdArg*(T: type TypedInputFile, p: TaintedString): T =
when not defined(nimscript): when not defined(nimscript):
try: try:
let f = open(path, fmRead) let f = system.open(path, fmRead)
close f close f
except IOError: except IOError:
raise newException(ValueError, "File not accessible") raise newException(ValueError, "File not accessible")