From: Kim Alvefur Date: Fri, 9 May 2014 21:28:09 +0000 (+0200) Subject: Merge 0.9->0.10 X-Git-Url: https://git.enpas.org/?a=commitdiff_plain;h=c49aa28dbba39243deba5502639e801d8ebeb3aa;p=prosody.git Merge 0.9->0.10 --- c49aa28dbba39243deba5502639e801d8ebeb3aa diff --cc core/configmanager.lua index 96c2517c,d175b54b..1f7342b2 --- a/core/configmanager.lua +++ b/core/configmanager.lua @@@ -14,9 -14,7 +14,9 @@@ local format, math_max = string.format local fire_event = prosody and prosody.events.fire_event or function () end; local envload = require"util.envload".envload; - local lfs = require "lfs"; + local deps = require"util.dependencies"; +local resolve_relative_path = require"util.paths".resolve_relative_path; +local glob_to_pattern = require"util.paths".glob_to_pattern; local path_sep = package.config:sub(1,1); module "configmanager" @@@ -180,9 -211,13 +180,13 @@@ d end end env.component = env.Component; - + function env.Include(file) if file:match("[*?]") then + local lfs = deps.softreq "lfs"; + if not lfs then + error(format("Error expanding wildcard pattern in Include %q - LuaFileSystem not available", file)); + end 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.."]+$", "");