From d508d771220a97e28a79f08c429d39dd0e87862d Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Thu, 27 Dec 2007 21:06:44 +0000 Subject: * removed always true if --- .../Communications/InventoryServiceBase.cs | 27 ++++++++++------------ 1 file changed, 12 insertions(+), 15 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/Communications/InventoryServiceBase.cs b/OpenSim/Framework/Communications/InventoryServiceBase.cs index 0797a84..534383a 100644 --- a/OpenSim/Framework/Communications/InventoryServiceBase.cs +++ b/OpenSim/Framework/Communications/InventoryServiceBase.cs @@ -65,7 +65,7 @@ namespace OpenSim.Framework.Communications if (typeInterface != null) { IInventoryData plug = - (IInventoryData) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); + (IInventoryData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); plug.Initialise(); m_plugins.Add(plug.getName(), plug); MainLog.Instance.Verbose("AGENTINVENTORY", "Added IInventoryData Interface"); @@ -74,44 +74,41 @@ namespace OpenSim.Framework.Communications } } } - + public List RequestFirstLevelFolders(Guid rawUserID) { LLUUID userID = new LLUUID(rawUserID); return RequestFirstLevelFolders(userID); } - + /// /// Returns the root folder plus any folders in root (so down one level in the Inventory folders tree) /// /// /// public List RequestFirstLevelFolders(LLUUID userID) - { - List inventoryList = new List(); + { + List inventoryList = new List(); InventoryFolderBase rootFolder = null; - + foreach (KeyValuePair plugin in m_plugins) { rootFolder = plugin.Value.getUserRootFolder(userID); if (rootFolder != null) { MainLog.Instance.Verbose( - "INVENTORY", + "INVENTORY", "Found root folder for user with ID " + userID + ". Retrieving inventory contents."); - + inventoryList = plugin.Value.getInventoryFolders(rootFolder.folderID); inventoryList.Insert(0, rootFolder); return inventoryList; } } - - if (null == rootFolder) - { - MainLog.Instance.Warn( - "INVENTORY", "Could not find a root folder belonging to user with ID " + userID); - } - + + MainLog.Instance.Warn( + "INVENTORY", "Could not find a root folder belonging to user with ID " + userID); + return inventoryList; } -- cgit v1.1