aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorDiva Canto2015-08-08 12:12:50 -0700
committerDiva Canto2015-08-08 12:12:50 -0700
commit959872315f67a1a33a2bae7330749f7dd74a4774 (patch)
treee31f6900453e77815859767cb2331d0412ec5b57 /OpenSim/Region/Framework/Scenes
parentHave osAvatarName2Key check the cache first, even for foreign users (diff)
downloadopensim-SC-959872315f67a1a33a2bae7330749f7dd74a4774.zip
opensim-SC-959872315f67a1a33a2bae7330749f7dd74a4774.tar.gz
opensim-SC-959872315f67a1a33a2bae7330749f7dd74a4774.tar.bz2
opensim-SC-959872315f67a1a33a2bae7330749f7dd74a4774.tar.xz
WARNING: massive refactor to follow libomv's latest changes regarding inventory folders. The newest version of libomv itself is committed here. Basically, everything that was using the AssetType enum has been combed through; many of those uses were changed to the new FolderType enum.
This means that from now on, [new] root folders have code 8 (FolderType.Root), as the viewers expect, as opposed to 9, which was what we had been doing. Normal folders are as they were, -1. Also now sending folder code 100 for Suitcase folders to viewers, with no filter. All tests pass, but fingers crossed!
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs10
1 files changed, 7 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index dde54d5..ac27716 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -156,7 +156,9 @@ namespace OpenSim.Region.Framework.Scenes
156 156
157 // OK so either the viewer didn't send a folderID or AddItem failed 157 // OK so either the viewer didn't send a folderID or AddItem failed
158 UUID originalFolder = item.Folder; 158 UUID originalFolder = item.Folder;
159 InventoryFolderBase f = InventoryService.GetFolderForType(item.Owner, (AssetType)item.AssetType); 159 InventoryFolderBase f = null;
160 if (Enum.IsDefined(typeof(FolderType), (sbyte)item.AssetType))
161 f = InventoryService.GetFolderForType(item.Owner, (FolderType)item.AssetType);
160 if (f != null) 162 if (f != null)
161 { 163 {
162 m_log.DebugFormat( 164 m_log.DebugFormat(
@@ -743,7 +745,9 @@ namespace OpenSim.Region.Framework.Scenes
743 745
744 if (itemCopy.Folder == UUID.Zero) 746 if (itemCopy.Folder == UUID.Zero)
745 { 747 {
746 InventoryFolderBase folder = InventoryService.GetFolderForType(recipient, (AssetType)itemCopy.AssetType); 748 InventoryFolderBase folder = null;
749 if (Enum.IsDefined(typeof(FolderType), (sbyte)item.AssetType))
750 folder = InventoryService.GetFolderForType(recipient, (FolderType)itemCopy.AssetType);
747 751
748 if (folder != null) 752 if (folder != null)
749 { 753 {
@@ -1155,7 +1159,7 @@ namespace OpenSim.Region.Framework.Scenes
1155 if (item == null) 1159 if (item == null)
1156 return; 1160 return;
1157 1161
1158 InventoryFolderBase destFolder = InventoryService.GetFolderForType(remoteClient.AgentId, AssetType.TrashFolder); 1162 InventoryFolderBase destFolder = InventoryService.GetFolderForType(remoteClient.AgentId, FolderType.Trash);
1159 1163
1160 // Move the item to trash. If this is a copyable item, only 1164 // Move the item to trash. If this is a copyable item, only
1161 // a copy will be moved and we will still need to delete 1165 // a copy will be moved and we will still need to delete