# HG changeset patch # User Matthew Wild # Date 1292970354 0 # Node ID d43177026cdaad9fa4d0527581593d6cefeb90d8 # Parent a4f8e226bc4af0bfec9db9436a842f80528db52c configmanager: Filenames without a path are also relative to the config file path, not the current working directory diff -r a4f8e226bc4a -r d43177026cda core/configmanager.lua --- a/core/configmanager.lua Tue Dec 21 14:44:13 2010 +0000 +++ b/core/configmanager.lua Tue Dec 21 22:25:54 2010 +0000 @@ -221,10 +221,11 @@ 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