Fix handling of missing auth.txt in the new handler
authorPerttu Ahola <celeron55@gmail.com>
Fri, 30 Mar 2012 20:12:01 +0000 (23:12 +0300)
committerPerttu Ahola <celeron55@gmail.com>
Fri, 30 Mar 2012 20:12:01 +0000 (23:12 +0300)
builtin/builtin.lua

index 34bda824561dbe8f03183bbad101d3a8bc0b1c26..7b39effb2a76b088bf91135735bd9d34143302a3 100644 (file)
@@ -1177,7 +1177,8 @@ local function read_auth_file()
        local newtable = {}
        local file, errmsg = io.open(minetest.auth_file_path, 'rb')
        if not file then
-               error(minetest.auth_file_path.." could not be opened for reading: "..errmsg)
+               minetest.log("info", minetest.auth_file_path.." could not be opened for reading ("..errmsg.."); assuming new world")
+               return
        end
        for line in file:lines() do
                if line ~= "" then