From 062d62c9b3096aa476fd4769c827d4c1f6ca47c3 Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Wed, 21 Feb 2018 01:50:46 +0000 Subject: [PATCH] lualoader: Don't return false for failure to open config on silent parse --- stand/lua/config.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/stand/lua/config.lua b/stand/lua/config.lua index c273cb20c53c..40514c741858 100644 --- a/stand/lua/config.lua +++ b/stand/lua/config.lua @@ -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