diff options
author | Kim Alvefur <zash@zash.se> | 2014-05-09 23:28:09 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2014-05-09 23:28:09 +0200 |
commit | 3cfe230bd0725c3c3cc3aacb97f11edf12da8305 (patch) | |
tree | 880497293119863efbe9818f2a01b5ccbedc48bb /core/configmanager.lua | |
parent | e31991a7735da1ab9d8a9a229e0c8d33810a50a5 (diff) | |
parent | ee9ceb739fc87218a728ba73339911a5d5fb1c76 (diff) | |
download | prosody-3cfe230bd0725c3c3cc3aacb97f11edf12da8305.tar.gz prosody-3cfe230bd0725c3c3cc3aacb97f11edf12da8305.zip |
Merge 0.9->0.10
Diffstat (limited to 'core/configmanager.lua')
-rw-r--r-- | core/configmanager.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/configmanager.lua b/core/configmanager.lua index 96c2517c..1f7342b2 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 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 @@ 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.."]+$", ""); |