Fix the long standing bug of items being delivered to lost and found or trash when takig copy.

This bug was recently aggravated through the perms changes required for the
export permission.
avinationmerge
Melanie 2013-05-01 21:35:50 +01:00
parent 958a500692
commit d982d24938
1 changed files with 3 additions and 2 deletions

View File

@ -676,11 +676,12 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
}
else
{
if (remoteClient == null || so.OwnerID != remoteClient.AgentId)
if (remoteClient == null || so.RootPart.OwnerID != remoteClient.AgentId)
{
// Taking copy of another person's item. Take to
// Objects folder.
folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.Object);
so.FromFolderID = UUID.Zero;
}
else
{
@ -696,7 +697,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
//
if (action == DeRezAction.Take || action == DeRezAction.TakeCopy)
{
if (so.FromFolderID != UUID.Zero && userID == remoteClient.AgentId)
if (so.FromFolderID != UUID.Zero && so.RootPart.OwnerID == remoteClient.AgentId)
{
InventoryFolderBase f = new InventoryFolderBase(so.FromFolderID, userID);
if (f != null)