aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs')
-rw-r--r--OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs13
1 files changed, 10 insertions, 3 deletions
diff --git a/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs b/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs
index 58c3269..a625c7e 100644
--- a/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs
+++ b/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs
@@ -307,7 +307,8 @@ namespace OpenSim.Framework.Communications.Cache
307 } 307 }
308 308
309 /// <summary> 309 /// <summary>
310 /// Find a folder given a PATH_DELIMITOR delimited path starting from this folder 310 /// Find a folder given a PATH_DELIMITER delimited path starting from this folder
311 /// </summary>
311 /// 312 ///
312 /// This method does not handle paths that contain multiple delimitors 313 /// This method does not handle paths that contain multiple delimitors
313 /// 314 ///
@@ -315,15 +316,21 @@ namespace OpenSim.Framework.Communications.Cache
315 /// XPath like expression 316 /// XPath like expression
316 /// 317 ///
317 /// FIXME: Delimitors which occur in names themselves are not currently escapable. 318 /// FIXME: Delimitors which occur in names themselves are not currently escapable.
318 /// </summary> 319 ///
319 /// <param name="path"> 320 /// <param name="path">
320 /// The path to the required folder. It this is empty then this folder itself is returned. 321 /// The path to the required folder.
322 /// It this is empty or consists only of the PATH_DELIMTER then this folder itself is returned.
321 /// </param> 323 /// </param>
322 /// <returns>null if the folder is not found</returns> 324 /// <returns>null if the folder is not found</returns>
323 public InventoryFolderImpl FindFolderByPath(string path) 325 public InventoryFolderImpl FindFolderByPath(string path)
324 { 326 {
325 if (path == string.Empty) 327 if (path == string.Empty)
326 return this; 328 return this;
329
330 path = path.Trim();
331
332 if (path == PATH_DELIMITER)
333 return this;
327 334
328 string[] components = path.Split(new string[] { PATH_DELIMITER }, 2, StringSplitOptions.None); 335 string[] components = path.Split(new string[] { PATH_DELIMITER }, 2, StringSplitOptions.None);
329 336