Software /
code /
prosody
Changeset
5125:cdbc86b69ea2
Merge 0.9->trunk
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 13 Sep 2012 18:32:24 +0100 |
parents | 5123:7c5c86fa552e (current diff) 5124:a4a74a0e9b9c (diff) |
children | 5127:cbcd173ad906 |
files | |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/core/configmanager.lua Thu Sep 13 00:32:12 2012 +0500 +++ b/core/configmanager.lua Thu Sep 13 18:32:24 2012 +0100 @@ -247,11 +247,10 @@ end end else + local file = resolve_relative_path(config_file:gsub("[^"..path_sep.."]+$", ""), file); local f, err = io.open(file); if f then - local data = f:read("*a"); - local file = resolve_relative_path(config_file:gsub("[^"..path_sep.."]+$", ""), file); - local ret, err = parsers.lua.load(data, file, config); + local ret, err = parsers.lua.load(f:read("*a"), file, config); if not ret then error(err:gsub("%[string.-%]", file), 0); end end if not f then error("Error loading included "..file..": "..err, 0); end