Merge branch 'master' of ssh://MyConnection/var/git/opensim
commit
d842c1d459
|
@ -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,29 +1140,28 @@ 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);
|
||||
string[] files = Directory.GetFiles(p, c);
|
||||
foreach (string f in files)
|
||||
// Only add files if that is the last path component
|
||||
if (compIndex == comps.Length - 1)
|
||||
{
|
||||
m_log.DebugFormat("[GLOB]: Adding file {0} to result list", f);
|
||||
found.Add(f);
|
||||
string[] files = Directory.GetFiles(p, c);
|
||||
foreach (string f in files)
|
||||
found.Add(f);
|
||||
}
|
||||
}
|
||||
paths = addpaths;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue