From 08e338979062268aa6c82fbe83903de5bcd77f30 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 29 Jun 2010 04:38:15 -0700 Subject: Buglet fix in HG inventory. Make sure that GetRootFolder for non-HG xinventory is the folder "My Inventory". Also changed the Suitcase folder name to "My Suitcase". --- .../Framework/InventoryAccess/HGInventoryAccessModule.cs | 2 +- OpenSim/Services/InventoryService/HGInventoryService.cs | 4 ++-- OpenSim/Services/InventoryService/XInventoryService.cs | 9 ++++++++- 3 files changed, 11 insertions(+), 4 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs index 2ab46aa..58c396c 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs @@ -131,7 +131,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess return ret; } - public virtual UUID DeleteToInventory(DeRezAction action, UUID folderID, + public override UUID DeleteToInventory(DeRezAction action, UUID folderID, SceneObjectGroup objectGroup, IClientAPI remoteClient) { UUID assetID = base.DeleteToInventory(action, folderID, new List() {objectGroup}, remoteClient); diff --git a/OpenSim/Services/InventoryService/HGInventoryService.cs b/OpenSim/Services/InventoryService/HGInventoryService.cs index 061effe..6e6b019 100644 --- a/OpenSim/Services/InventoryService/HGInventoryService.cs +++ b/OpenSim/Services/InventoryService/HGInventoryService.cs @@ -108,13 +108,13 @@ namespace OpenSim.Services.InventoryService // Warp! Root folder for travelers XInventoryFolder[] folders = m_Database.GetFolders( new string[] { "agentID", "folderName"}, - new string[] { principalID.ToString(), "Suitcase" }); + new string[] { principalID.ToString(), "My Suitcase" }); if (folders.Length > 0) return ConvertToOpenSim(folders[0]); // make one - XInventoryFolder suitcase = CreateFolder(principalID, UUID.Zero, (int)AssetType.Folder, "Suitcase"); + XInventoryFolder suitcase = CreateFolder(principalID, UUID.Zero, (int)AssetType.Folder, "My Suitcase"); return ConvertToOpenSim(suitcase); } diff --git a/OpenSim/Services/InventoryService/XInventoryService.cs b/OpenSim/Services/InventoryService/XInventoryService.cs index af831fd..f48bf60 100644 --- a/OpenSim/Services/InventoryService/XInventoryService.cs +++ b/OpenSim/Services/InventoryService/XInventoryService.cs @@ -200,7 +200,14 @@ namespace OpenSim.Services.InventoryService if (folders.Length == 0) return null; - return ConvertToOpenSim(folders[0]); + XInventoryFolder root = null; + foreach (XInventoryFolder folder in folders) + if (folder.folderName == "My Inventory") + root = folder; + if (folders == null) // oops + root = folders[0]; + + return ConvertToOpenSim(root); } public virtual InventoryFolderBase GetFolderForType(UUID principalID, AssetType type) -- cgit v1.1