diff options
author | Matthew Wild <mwild1@gmail.com> | 2012-09-13 18:32:24 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2012-09-13 18:32:24 +0100 |
commit | b3714103ae4098fa1e22d0504365607f688f7a83 (patch) | |
tree | 7c6a0a8551771a89ec2fcc3f58857f0b0a26db1a /core | |
parent | 48a297e80c605ac4b47a03e25fd1ccc33f4ba4c5 (diff) | |
parent | 3c5b09b7f1c1eddf57605e7651ae9790f3bbfc7a (diff) | |
download | prosody-b3714103ae4098fa1e22d0504365607f688f7a83.tar.gz prosody-b3714103ae4098fa1e22d0504365607f688f7a83.zip |
Merge 0.9->trunk
Diffstat (limited to 'core')
-rw-r--r-- | core/configmanager.lua | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/core/configmanager.lua b/core/configmanager.lua index 8fea3be5..51b9f5fe 100644 --- a/core/configmanager.lua +++ b/core/configmanager.lua @@ -247,11 +247,10 @@ do 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 |