diff options
6 files changed, 18 insertions, 16 deletions
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 | |||
131 | return ret; | 131 | return ret; |
132 | } | 132 | } |
133 | 133 | ||
134 | public virtual UUID DeleteToInventory(DeRezAction action, UUID folderID, | 134 | public override UUID DeleteToInventory(DeRezAction action, UUID folderID, |
135 | SceneObjectGroup objectGroup, IClientAPI remoteClient) | 135 | SceneObjectGroup objectGroup, IClientAPI remoteClient) |
136 | { | 136 | { |
137 | UUID assetID = base.DeleteToInventory(action, folderID, new List<SceneObjectGroup>() {objectGroup}, remoteClient); | 137 | UUID assetID = base.DeleteToInventory(action, folderID, new List<SceneObjectGroup>() {objectGroup}, remoteClient); |
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index 3035d88..12b6aa0 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -286,23 +286,15 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
286 | { | 286 | { |
287 | // Deleting someone else's item | 287 | // Deleting someone else's item |
288 | // | 288 | // |
289 | |||
290 | |||
291 | if (remoteClient == null || | 289 | if (remoteClient == null || |
292 | objectGroup.OwnerID != remoteClient.AgentId) | 290 | objectGroup.OwnerID != remoteClient.AgentId) |
293 | { | 291 | { |
294 | // Folder skeleton may not be loaded and we | 292 | |
295 | // have to wait for the inventory to find | ||
296 | // the destination folder | ||
297 | // | ||
298 | folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.LostAndFoundFolder); | 293 | folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.LostAndFoundFolder); |
299 | } | 294 | } |
300 | else | 295 | else |
301 | { | 296 | { |
302 | // Assume inventory skeleton was loaded during login | 297 | folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.TrashFolder); |
303 | // and all folders can be found | ||
304 | // | ||
305 | folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.TrashFolder); | ||
306 | } | 298 | } |
307 | } | 299 | } |
308 | else if (action == DeRezAction.Return) | 300 | else if (action == DeRezAction.Return) |
@@ -332,7 +324,6 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
332 | 324 | ||
333 | if (folder == null) // None of the above | 325 | if (folder == null) // None of the above |
334 | { | 326 | { |
335 | //folder = userInfo.RootFolder.FindFolder(folderID); | ||
336 | folder = new InventoryFolderBase(folderID); | 327 | folder = new InventoryFolderBase(folderID); |
337 | 328 | ||
338 | if (folder == null) // Nowhere to put it | 329 | if (folder == null) // Nowhere to put it |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Inventory/InventoryServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Inventory/InventoryServiceInConnectorModule.cs index ae03cdf..209cf0d 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Inventory/InventoryServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Inventory/InventoryServiceInConnectorModule.cs | |||
@@ -96,7 +96,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Inventory | |||
96 | 96 | ||
97 | Object[] args = new Object[] { m_Config, MainServer.Instance, "HGInventoryService" }; | 97 | Object[] args = new Object[] { m_Config, MainServer.Instance, "HGInventoryService" }; |
98 | 98 | ||
99 | ServerUtils.LoadPlugin<IServiceConnector>("OpenSim.Server.Handlers.dll:HGInventoryServiceInConnector", args); | 99 | ServerUtils.LoadPlugin<IServiceConnector>("OpenSim.Server.Handlers.dll:XInventoryInConnector", args); |
100 | } | 100 | } |
101 | } | 101 | } |
102 | 102 | ||
diff --git a/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs b/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs index 6e580f1..ac6a3ab 100644 --- a/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs +++ b/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs | |||
@@ -44,6 +44,8 @@ namespace OpenSim.Server.Handlers.Asset | |||
44 | { | 44 | { |
45 | public class XInventoryInConnector : ServiceConnector | 45 | public class XInventoryInConnector : ServiceConnector |
46 | { | 46 | { |
47 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
48 | |||
47 | private IInventoryService m_InventoryService; | 49 | private IInventoryService m_InventoryService; |
48 | private string m_ConfigName = "InventoryService"; | 50 | private string m_ConfigName = "InventoryService"; |
49 | 51 | ||
@@ -53,6 +55,8 @@ namespace OpenSim.Server.Handlers.Asset | |||
53 | if (configName != String.Empty) | 55 | if (configName != String.Empty) |
54 | m_ConfigName = configName; | 56 | m_ConfigName = configName; |
55 | 57 | ||
58 | m_log.DebugFormat("[XInventoryInConnector]: Starting with config name {0}", m_ConfigName); | ||
59 | |||
56 | IConfig serverConfig = config.Configs[m_ConfigName]; | 60 | IConfig serverConfig = config.Configs[m_ConfigName]; |
57 | if (serverConfig == null) | 61 | if (serverConfig == null) |
58 | throw new Exception(String.Format("No section '{0}' in config file", m_ConfigName)); | 62 | throw new Exception(String.Format("No section '{0}' in config file", m_ConfigName)); |
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 | |||
108 | // Warp! Root folder for travelers | 108 | // Warp! Root folder for travelers |
109 | XInventoryFolder[] folders = m_Database.GetFolders( | 109 | XInventoryFolder[] folders = m_Database.GetFolders( |
110 | new string[] { "agentID", "folderName"}, | 110 | new string[] { "agentID", "folderName"}, |
111 | new string[] { principalID.ToString(), "Suitcase" }); | 111 | new string[] { principalID.ToString(), "My Suitcase" }); |
112 | 112 | ||
113 | if (folders.Length > 0) | 113 | if (folders.Length > 0) |
114 | return ConvertToOpenSim(folders[0]); | 114 | return ConvertToOpenSim(folders[0]); |
115 | 115 | ||
116 | // make one | 116 | // make one |
117 | XInventoryFolder suitcase = CreateFolder(principalID, UUID.Zero, (int)AssetType.Folder, "Suitcase"); | 117 | XInventoryFolder suitcase = CreateFolder(principalID, UUID.Zero, (int)AssetType.Folder, "My Suitcase"); |
118 | return ConvertToOpenSim(suitcase); | 118 | return ConvertToOpenSim(suitcase); |
119 | } | 119 | } |
120 | 120 | ||
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 | |||
200 | if (folders.Length == 0) | 200 | if (folders.Length == 0) |
201 | return null; | 201 | return null; |
202 | 202 | ||
203 | return ConvertToOpenSim(folders[0]); | 203 | XInventoryFolder root = null; |
204 | foreach (XInventoryFolder folder in folders) | ||
205 | if (folder.folderName == "My Inventory") | ||
206 | root = folder; | ||
207 | if (folders == null) // oops | ||
208 | root = folders[0]; | ||
209 | |||
210 | return ConvertToOpenSim(root); | ||
204 | } | 211 | } |
205 | 212 | ||
206 | public virtual InventoryFolderBase GetFolderForType(UUID principalID, AssetType type) | 213 | public virtual InventoryFolderBase GetFolderForType(UUID principalID, AssetType type) |