diff options
author | Melanie | 2012-10-02 23:02:01 +0100 |
---|---|---|
committer | Melanie | 2012-10-02 23:03:52 +0100 |
commit | f433ee317be85fdf49bad84946a2e771ee1d6204 (patch) | |
tree | 2a9a62a07763a68ca6534f464c38615934866a4d /OpenSim | |
parent | Merge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork (diff) | |
download | opensim-SC_OLD-f433ee317be85fdf49bad84946a2e771ee1d6204.zip opensim-SC_OLD-f433ee317be85fdf49bad84946a2e771ee1d6204.tar.gz opensim-SC_OLD-f433ee317be85fdf49bad84946a2e771ee1d6204.tar.bz2 opensim-SC_OLD-f433ee317be85fdf49bad84946a2e771ee1d6204.tar.xz |
Attempt to fix Mantis #6311. Honor a destination folder if one is given
Diffstat (limited to 'OpenSim')
-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 81de29c..c14cb17 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs | |||
@@ -313,6 +313,45 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
313 | m_TransferModule.SendInstantMessage(im, delegate(bool success) {}); | 313 | m_TransferModule.SendInstantMessage(im, delegate(bool success) {}); |
314 | } | 314 | } |
315 | } | 315 | } |
316 | else if (im.dialog == (byte) InstantMessageDialog.TaskInventoryAccepted) | ||
317 | { | ||
318 | UUID destinationFolderID = UUID.Zero; | ||
319 | |||
320 | if (im.binaryBucket != null && im.binaryBucket.Length >= 16) | ||
321 | { | ||
322 | destinationFolderID = new UUID(im.binaryBucket, 0); | ||
323 | } | ||
324 | |||
325 | if (destinationFolderID != UUID.Zero) | ||
326 | { | ||
327 | IInventoryService invService = scene.InventoryService; | ||
328 | |||
329 | UUID inventoryID = new UUID(im.imSessionID); // The inventory item/folder, back from it's trip | ||
330 | |||
331 | InventoryItemBase item = new InventoryItemBase(inventoryID, client.AgentId); | ||
332 | item = invService.GetItem(item); | ||
333 | InventoryFolderBase folder = null; | ||
334 | |||
335 | if (item != null) // It's an item | ||
336 | { | ||
337 | item.Folder = destinationFolderID; | ||
338 | |||
339 | invService.DeleteItems(item.Owner, new List<UUID>() { item.ID }); | ||
340 | scene.AddInventoryItem(client, item); | ||
341 | } | ||
342 | else | ||
343 | { | ||
344 | folder = new InventoryFolderBase(inventoryID, client.AgentId); | ||
345 | folder = invService.GetFolder(folder); | ||
346 | |||
347 | if (folder != null) // It's a folder | ||
348 | { | ||
349 | folder.ParentID = destinationFolderID; | ||
350 | invService.MoveFolder(folder); | ||
351 | } | ||
352 | } | ||
353 | } | ||
354 | } | ||
316 | else if ( | 355 | else if ( |
317 | im.dialog == (byte)InstantMessageDialog.InventoryDeclined | 356 | im.dialog == (byte)InstantMessageDialog.InventoryDeclined |
318 | || im.dialog == (byte)InstantMessageDialog.TaskInventoryDeclined) | 357 | || im.dialog == (byte)InstantMessageDialog.TaskInventoryDeclined) |