lualoader: Don't return false for failure to open config on silent parse

This commit is contained in:
Kyle Evans 2018-02-21 01:50:46 +00:00
parent 4955048946
commit 062d62c9b3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=329688

View File

@ -270,13 +270,17 @@ function config.loadmod(mod, silent)
return status
end
-- silent runs will not return false if we fail to open the file
function config.parse(name, silent)
if silent == nil then
silent = false
end
local f = io.open(name)
if f == nil then
if not silent then
print("Failed to open config: '" .. name .. "'")
end
return false
return silent
end
local text
@ -288,7 +292,7 @@ function config.parse(name, silent)
if not silent then
print("Failed to read config: '" .. name .. "'")
end
return false
return silent
end
local n = 1