Remove debugging output frm ini file loading. Make it collect matching

files only from last path component.
arthursv
Melanie 2009-08-07 23:05:16 +01:00
parent a1a09297bc
commit 257ed4c4ac
2 changed files with 8 additions and 11 deletions

View File

@ -1113,7 +1113,6 @@ namespace OpenSim.Framework
public static string[] Glob(string path)
{
m_log.DebugFormat("[GLOB]: Globbing {0}", path);
string vol=String.Empty;
if (Path.VolumeSeparatorChar != Path.DirectorySeparatorChar)
@ -1141,28 +1140,27 @@ namespace OpenSim.Framework
List<string> found = new List<string>();
paths.Add(path);
int compIndex = -1;
foreach (string c in comps)
{
compIndex++;
List<string> addpaths = new List<string>();
foreach (string p in paths)
{
m_log.DebugFormat("[GLOB]: Getting directories (wildcard: {0}) from path {1}", c, p);
string[] dirs = Directory.GetDirectories(p, c);
if (dirs.Length != 0)
{
foreach (string dir in dirs)
{
m_log.DebugFormat("[GLOB]: Adding path {0} to search list", Path.Combine(path, dir));
addpaths.Add(Path.Combine(path, dir));
}
}
m_log.DebugFormat("[GLOB]: Getting files (wildcard: {0}) from path {1}", c, p);
// Only add files if that is the last path component
if (compIndex == comps.Length - 1)
{
string[] files = Directory.GetFiles(p, c);
foreach (string f in files)
{
m_log.DebugFormat("[GLOB]: Adding file {0} to result list", f);
found.Add(f);
}
}

View File

@ -186,7 +186,6 @@ namespace OpenSim
}
else
{
m_log.InfoFormat("Adding {0} to configuration", Path.Combine(Util.configDir(), file));
string basepath = Path.GetFullPath(Util.configDir());
string path = Path.Combine(basepath, file);
string[] paths = Util.Glob(path);