diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index cfcd544..9b838ab 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -414,6 +414,25 @@ namespace OpenSim.Region.Framework.Scenes | |||
414 | itemCopy.BasePermissions = item.BasePermissions; | 414 | itemCopy.BasePermissions = item.BasePermissions; |
415 | } | 415 | } |
416 | 416 | ||
417 | if (itemCopy.Folder == UUID.Zero) | ||
418 | { | ||
419 | InventoryFolderBase folder = InventoryService.GetFolderForType(recipient, (AssetType)itemCopy.AssetType); | ||
420 | |||
421 | if (folder != null) | ||
422 | { | ||
423 | itemCopy.Folder = folder.ID; | ||
424 | } | ||
425 | else | ||
426 | { | ||
427 | InventoryFolderBase root = InventoryService.GetRootFolder(recipient); | ||
428 | |||
429 | if (root != null) | ||
430 | itemCopy.Folder = root.ID; | ||
431 | else | ||
432 | return null; // No destination | ||
433 | } | ||
434 | } | ||
435 | |||
417 | itemCopy.GroupID = UUID.Zero; | 436 | itemCopy.GroupID = UUID.Zero; |
418 | itemCopy.GroupOwned = false; | 437 | itemCopy.GroupOwned = false; |
419 | itemCopy.Flags = item.Flags; | 438 | itemCopy.Flags = item.Flags; |