aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs19
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 9117224..20760b2 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -415,6 +415,25 @@ namespace OpenSim.Region.Framework.Scenes
415 itemCopy.BasePermissions = item.BasePermissions; 415 itemCopy.BasePermissions = item.BasePermissions;
416 } 416 }
417 417
418 if (itemCopy.Folder == UUID.Zero)
419 {
420 InventoryFolderBase folder = InventoryService.GetFolderForType(recipient, (AssetType)itemCopy.AssetType);
421
422 if (folder != null)
423 {
424 itemCopy.Folder = folder.ID;
425 }
426 else
427 {
428 InventoryFolderBase root = InventoryService.GetRootFolder(recipient);
429
430 if (root != null)
431 itemCopy.Folder = root.ID;
432 else
433 return null; // No destination
434 }
435 }
436
418 itemCopy.GroupID = UUID.Zero; 437 itemCopy.GroupID = UUID.Zero;
419 itemCopy.GroupOwned = false; 438 itemCopy.GroupOwned = false;
420 itemCopy.Flags = item.Flags; 439 itemCopy.Flags = item.Flags;