X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=core%2Fconfigmanager.lua;h=d175b54b3efd9feaaaf5e57b27a5dd382fe5498f;hb=97dc1e55d6225d0e54c959b288acb9c0ffa9e930;hp=d73bafa4e2bc2ff126b86056af72dd8f0c416106;hpb=5c97c6cba81f291c59e9090af5daa4a8e6a3d030;p=prosody.git diff --git a/core/configmanager.lua b/core/configmanager.lua index d73bafa4..d175b54b 100644 --- a/core/configmanager.lua +++ b/core/configmanager.lua @@ -14,7 +14,7 @@ local format, math_max = string.format, math.max; 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 path_sep = package.config:sub(1,1); module "configmanager" @@ -214,6 +214,10 @@ do 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.."]+$", "");