aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorMelanie2009-08-07 23:05:16 +0100
committerMelanie2009-08-07 23:05:16 +0100
commit257ed4c4ac2026b39c90d9f58d505dc2721e8df3 (patch)
tree06d1d7a835bdf84913f898d554910f0dbb84471a /OpenSim/Framework
parentSilly error, simple fix (diff)
downloadopensim-SC_OLD-257ed4c4ac2026b39c90d9f58d505dc2721e8df3.zip
opensim-SC_OLD-257ed4c4ac2026b39c90d9f58d505dc2721e8df3.tar.gz
opensim-SC_OLD-257ed4c4ac2026b39c90d9f58d505dc2721e8df3.tar.bz2
opensim-SC_OLD-257ed4c4ac2026b39c90d9f58d505dc2721e8df3.tar.xz
Remove debugging output frm ini file loading. Make it collect matching
files only from last path component.
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Util.cs18
1 files changed, 8 insertions, 10 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index 048de84..bbb0ae2 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -1113,7 +1113,6 @@ namespace OpenSim.Framework
1113 1113
1114 public static string[] Glob(string path) 1114 public static string[] Glob(string path)
1115 { 1115 {
1116 m_log.DebugFormat("[GLOB]: Globbing {0}", path);
1117 string vol=String.Empty; 1116 string vol=String.Empty;
1118 1117
1119 if (Path.VolumeSeparatorChar != Path.DirectorySeparatorChar) 1118 if (Path.VolumeSeparatorChar != Path.DirectorySeparatorChar)
@@ -1141,29 +1140,28 @@ namespace OpenSim.Framework
1141 List<string> found = new List<string>(); 1140 List<string> found = new List<string>();
1142 paths.Add(path); 1141 paths.Add(path);
1143 1142
1143 int compIndex = -1;
1144 foreach (string c in comps) 1144 foreach (string c in comps)
1145 { 1145 {
1146 compIndex++;
1147
1146 List<string> addpaths = new List<string>(); 1148 List<string> addpaths = new List<string>();
1147 foreach (string p in paths) 1149 foreach (string p in paths)
1148 { 1150 {
1149 m_log.DebugFormat("[GLOB]: Getting directories (wildcard: {0}) from path {1}", c, p);
1150 string[] dirs = Directory.GetDirectories(p, c); 1151 string[] dirs = Directory.GetDirectories(p, c);
1151 1152
1152 if (dirs.Length != 0) 1153 if (dirs.Length != 0)
1153 { 1154 {
1154 foreach (string dir in dirs) 1155 foreach (string dir in dirs)
1155 {
1156 m_log.DebugFormat("[GLOB]: Adding path {0} to search list", Path.Combine(path, dir));
1157 addpaths.Add(Path.Combine(path, dir)); 1156 addpaths.Add(Path.Combine(path, dir));
1158 }
1159 } 1157 }
1160 1158
1161 m_log.DebugFormat("[GLOB]: Getting files (wildcard: {0}) from path {1}", c, p); 1159 // Only add files if that is the last path component
1162 string[] files = Directory.GetFiles(p, c); 1160 if (compIndex == comps.Length - 1)
1163 foreach (string f in files)
1164 { 1161 {
1165 m_log.DebugFormat("[GLOB]: Adding file {0} to result list", f); 1162 string[] files = Directory.GetFiles(p, c);
1166 found.Add(f); 1163 foreach (string f in files)
1164 found.Add(f);
1167 } 1165 }
1168 } 1166 }
1169 paths = addpaths; 1167 paths = addpaths;