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".

0.7-release
Diva Canto 2010-06-29 04:38:15 -07:00
parent 9fde9085a0
commit 08e3389790
3 changed files with 11 additions and 4 deletions

View File

@ -131,7 +131,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
return ret; return ret;
} }
public virtual UUID DeleteToInventory(DeRezAction action, UUID folderID, public override UUID DeleteToInventory(DeRezAction action, UUID folderID,
SceneObjectGroup objectGroup, IClientAPI remoteClient) SceneObjectGroup objectGroup, IClientAPI remoteClient)
{ {
UUID assetID = base.DeleteToInventory(action, folderID, new List<SceneObjectGroup>() {objectGroup}, remoteClient); UUID assetID = base.DeleteToInventory(action, folderID, new List<SceneObjectGroup>() {objectGroup}, remoteClient);

View File

@ -108,13 +108,13 @@ namespace OpenSim.Services.InventoryService
// Warp! Root folder for travelers // Warp! Root folder for travelers
XInventoryFolder[] folders = m_Database.GetFolders( XInventoryFolder[] folders = m_Database.GetFolders(
new string[] { "agentID", "folderName"}, new string[] { "agentID", "folderName"},
new string[] { principalID.ToString(), "Suitcase" }); new string[] { principalID.ToString(), "My Suitcase" });
if (folders.Length > 0) if (folders.Length > 0)
return ConvertToOpenSim(folders[0]); return ConvertToOpenSim(folders[0]);
// make one // 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); return ConvertToOpenSim(suitcase);
} }

View File

@ -200,7 +200,14 @@ namespace OpenSim.Services.InventoryService
if (folders.Length == 0) if (folders.Length == 0)
return null; 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) public virtual InventoryFolderBase GetFolderForType(UUID principalID, AssetType type)