# HG changeset patch # User Kim Alvefur # Date 1399670889 -7200 # Node ID 5af7fe1014db184b246342d5522e8bd9f574966b # Parent 6a184b16b71718ce57b437537405fd7f68c49137# Parent 46cb87d531a7d7c87c7c2f108de36db12ca77bb5 Merge 0.9->0.10 diff -r 6a184b16b717 -r 5af7fe1014db core/configmanager.lua --- a/core/configmanager.lua Fri May 09 19:35:29 2014 +0200 +++ b/core/configmanager.lua Fri May 09 23:28:09 2014 +0200 @@ -14,7 +14,7 @@ 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); @@ -183,6 +183,10 @@ 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.."]+$", "");