aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie Thielker2010-05-03 23:44:23 +0200
committerMelanie2010-05-03 21:25:02 +0100
commit92561aef8dd1658bc29e5f9458c94407be7da582 (patch)
treea91945b684befe2adf199111be0218f1275e48b4 /OpenSim
parentFix a bug in owner change notification (diff)
downloadopensim-SC_OLD-92561aef8dd1658bc29e5f9458c94407be7da582.zip
opensim-SC_OLD-92561aef8dd1658bc29e5f9458c94407be7da582.tar.gz
opensim-SC_OLD-92561aef8dd1658bc29e5f9458c94407be7da582.tar.bz2
opensim-SC_OLD-92561aef8dd1658bc29e5f9458c94407be7da582.tar.xz
Store given items in correct parent folder. Fixes items given to offline avatars
not getting lost.
Diffstat (limited to 'OpenSim')
-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;