diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs index da708d2..80554fb 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs | |||
@@ -268,6 +268,39 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
268 | else if (im.dialog == (byte) InstantMessageDialog.InventoryAccepted || | 268 | else if (im.dialog == (byte) InstantMessageDialog.InventoryAccepted || |
269 | im.dialog == (byte) InstantMessageDialog.TaskInventoryAccepted) | 269 | im.dialog == (byte) InstantMessageDialog.TaskInventoryAccepted) |
270 | { | 270 | { |
271 | UUID inventoryID = new UUID(im.imSessionID); // The inventory item/folder, back from it's trip | ||
272 | IInventoryService invService = scene.InventoryService; | ||
273 | |||
274 | // Special case: folder redirect. | ||
275 | // RLV uses this | ||
276 | if (im.dialog == (byte) InstantMessageDialog.TaskInventoryAccepted) | ||
277 | { | ||
278 | InventoryFolderBase folder = new InventoryFolderBase(inventoryID, client.AgentId); | ||
279 | folder = invService.GetFolder(folder); | ||
280 | |||
281 | if (folder != null) | ||
282 | { | ||
283 | if (im.binaryBucket.Length >= 16) | ||
284 | { | ||
285 | UUID destFolderID = new UUID(im.binaryBucket, 0); | ||
286 | if (destFolderID != UUID.Zero) | ||
287 | { | ||
288 | InventoryFolderBase destFolder = new InventoryFolderBase(destFolderID, client.AgentId); | ||
289 | destFolder = invService.GetFolder(destFolder); | ||
290 | if (destFolder != null) | ||
291 | { | ||
292 | if (folder.ParentID != destFolder.ID) | ||
293 | { | ||
294 | folder.ParentID = destFolder.ID; | ||
295 | invService.MoveFolder(folder); | ||
296 | client.SendBulkUpdateInventory(folder); | ||
297 | } | ||
298 | } | ||
299 | } | ||
300 | } | ||
301 | } | ||
302 | } | ||
303 | |||
271 | ScenePresence user = scene.GetScenePresence(new UUID(im.toAgentID)); | 304 | ScenePresence user = scene.GetScenePresence(new UUID(im.toAgentID)); |
272 | 305 | ||
273 | if (user != null) // Local | 306 | if (user != null) // Local |