aboutsummaryrefslogtreecommitdiffstats
path: root/core/configmanager.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-12-21 22:25:54 +0000
committerMatthew Wild <mwild1@gmail.com>2010-12-21 22:25:54 +0000
commit949fdfb956690ce0c4a2817a0f410db0bb751e88 (patch)
tree7d2e3068844b505bfda4c9e95a8d65790d14814a /core/configmanager.lua
parentbfc6ce85617ded179bc04ce2337eb583e58b4578 (diff)
downloadprosody-949fdfb956690ce0c4a2817a0f410db0bb751e88.tar.gz
prosody-949fdfb956690ce0c4a2817a0f410db0bb751e88.zip
configmanager: Filenames without a path are also relative to the config file path, not the current working directory
Diffstat (limited to 'core/configmanager.lua')
-rw-r--r--core/configmanager.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/configmanager.lua b/core/configmanager.lua
index 839927df..b703bb8c 100644
--- a/core/configmanager.lua
+++ b/core/configmanager.lua
@@ -221,10 +221,11 @@ do
if file:match("[*?]") then
local path_pos, glob = file:match("()([^"..path_sep.."]+)$");
local path = file:sub(1, math_max(path_pos-2,0));
+ local config_path = config_file:gsub("[^"..path_sep.."]+$", "");
if #path > 0 then
- path = resolve_relative_path(config_file:gsub("[^"..path_sep.."]+$", ""), path);
+ path = resolve_relative_path(config_path, path);
else
- path = ".";
+ path = config_path;
end
local patt = glob_to_pattern(glob);
for f in lfs.dir(path) do