From efc57bc3d79e9c3c0971a2715a407ad08e030f02 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 6 Aug 2009 02:29:12 +0100 Subject: Allow arbitrary wildcards in config includes. Things like Include-Modules = "addin-modules/*/config/*.ini" will now work. Adds Util.Glob, which will resolve a globbed path into a string list. --- OpenSim/Region/Application/ConfigurationLoader.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/ConfigurationLoader.cs b/OpenSim/Region/Application/ConfigurationLoader.cs index 1be36ca..7bb8864 100644 --- a/OpenSim/Region/Application/ConfigurationLoader.cs +++ b/OpenSim/Region/Application/ConfigurationLoader.cs @@ -188,10 +188,11 @@ namespace OpenSim { string path = Path.GetFullPath( Path.Combine(Util.configDir(), file)); - if (File.Exists(path)) + string[] paths = Util.Glob(path); + foreach (string p in paths) { - if (!sources.Contains(path)) - sources.Add(path); + if (!sources.Contains(p)) + sources.Add(p); } } } -- cgit v1.1