Author: kevans
Date: Wed Feb 21 01:50:46 2018
New Revision: 329688
URL: https://svnweb.freebsd.org/changeset/base/329688

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

Modified:
  head/stand/lua/config.lua

Modified: head/stand/lua/config.lua
==============================================================================
--- head/stand/lua/config.lua   Wed Feb 21 01:39:33 2018        (r329687)
+++ head/stand/lua/config.lua   Wed Feb 21 01:50:46 2018        (r329688)
@@ -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
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to