Mercurial > prosody-hg
diff core/configmanager.lua @ 14129:6da8b3db84de 13.0
configmanager: Return errno (if any) for file opening errors
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Thu, 16 Apr 2026 18:49:04 +0100 |
| parents | f0d854c63c8d |
| children |
line wrap: on
line diff
--- a/core/configmanager.lua Thu Apr 16 18:17:29 2026 +0100 +++ b/core/configmanager.lua Thu Apr 16 18:49:04 2026 +0100 @@ -90,7 +90,7 @@ config_format = config_format or filename:match("%w+$"); if config_format == "lua" then - local f, err = io.open(filename); + local f, err, errno = io.open(filename); if f then local new_config = setmetatable({ ["*"] = { } }, config_mt); local ok, err = parser.load(f:read("*a"), filename, new_config); @@ -100,7 +100,7 @@ end return ok, "parser", err; end - return f, "file", err; + return f, "file", err, errno; end if not config_format then
