diff options
author | Melanie | 2012-10-02 23:02:01 +0100 |
---|---|---|
committer | Melanie | 2012-10-02 23:02:01 +0100 |
commit | f1886c449cd3395de66bacbce0f3704c77c6a935 (patch) | |
tree | c251b3d9691b8d61ca621d4a915b9e8823c2676d /OpenSim | |
parent | Add money event routing to the script engine. (diff) | |
download | opensim-SC-f1886c449cd3395de66bacbce0f3704c77c6a935.zip opensim-SC-f1886c449cd3395de66bacbce0f3704c77c6a935.tar.gz opensim-SC-f1886c449cd3395de66bacbce0f3704c77c6a935.tar.bz2 opensim-SC-f1886c449cd3395de66bacbce0f3704c77c6a935.tar.xz |
Attempt to fix Mantis #6311. Honor a destination folder if one is given
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs index f3af59a..91eda19 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs | |||
@@ -297,6 +297,45 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
297 | }); | 297 | }); |
298 | } | 298 | } |
299 | } | 299 | } |
300 | else if (im.dialog == (byte) InstantMessageDialog.TaskInventoryAccepted) | ||
301 | { | ||
302 | UUID destinationFolderID = UUID.Zero; | ||
303 | |||
304 | if (im.binaryBucket != null && im.binaryBucket.Length >= 16) | ||
305 | { | ||
306 | destinationFolderID = new UUID(im.binaryBucket, 0); | ||
307 | } | ||
308 | |||
309 | if (destinationFolderID != UUID.Zero) | ||
310 | { | ||
311 | IInventoryService invService = scene.InventoryService; | ||
312 | |||
313 | UUID inventoryID = new UUID(im.imSessionID); // The inventory item/folder, back from it's trip | ||
314 | |||
315 | InventoryItemBase item = new InventoryItemBase(inventoryID, client.AgentId); | ||
316 | item = invService.GetItem(item); | ||
317 | InventoryFolderBase folder = null; | ||
318 | |||
319 | if (item != null) // It's an item | ||
320 | { | ||
321 | item.Folder = destinationFolderID; | ||
322 | |||
323 | invService.DeleteItems(item.Owner, new List<UUID>() { item.ID }); | ||
324 | scene.AddInventoryItem(client, item); | ||
325 | } | ||
326 | else | ||
327 | { | ||
328 | folder = new InventoryFolderBase(inventoryID, client.AgentId); | ||
329 | folder = invService.GetFolder(folder); | ||
330 | |||
331 | if (folder != null) // It's a folder | ||
332 | { | ||
333 | folder.ParentID = destinationFolderID; | ||
334 | invService.MoveFolder(folder); | ||
335 | } | ||
336 | } | ||
337 | } | ||
338 | } | ||
300 | else if ( | 339 | else if ( |
301 | im.dialog == (byte)InstantMessageDialog.InventoryDeclined | 340 | im.dialog == (byte)InstantMessageDialog.InventoryDeclined |
302 | || im.dialog == (byte)InstantMessageDialog.TaskInventoryDeclined) | 341 | || im.dialog == (byte)InstantMessageDialog.TaskInventoryDeclined) |