From d03c32aa695117b16307bb89fea4142167e42bfb Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Tue, 17 Feb 2009 18:46:42 +0000 Subject: * Allow inventory archives to be saved from the 'root' inventory directory * Reload doesn't currently obey structure information * Not yet ready for use --- .../Framework/Communications/Cache/InventoryFolderImpl.cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs') 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 } /// - /// Find a folder given a PATH_DELIMITOR delimited path starting from this folder + /// Find a folder given a PATH_DELIMITER delimited path starting from this folder + /// /// /// This method does not handle paths that contain multiple delimitors /// @@ -315,15 +316,21 @@ namespace OpenSim.Framework.Communications.Cache /// XPath like expression /// /// FIXME: Delimitors which occur in names themselves are not currently escapable. - /// + /// /// - /// The path to the required folder. It this is empty then this folder itself is returned. + /// The path to the required folder. + /// It this is empty or consists only of the PATH_DELIMTER then this folder itself is returned. /// /// null if the folder is not found public InventoryFolderImpl FindFolderByPath(string path) { if (path == string.Empty) return this; + + path = path.Trim(); + + if (path == PATH_DELIMITER) + return this; string[] components = path.Split(new string[] { PATH_DELIMITER }, 2, StringSplitOptions.None); -- cgit v1.1