From f16cf1284011c2376dedc3ac23919c5eb6abab5d Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Mon, 17 Nov 2008 15:52:27 +0000 Subject: * Fix probable partial breakage of delete to inventory in last commit * Not nulling out parts and the root part allows the code to be simplified --- .../Scenes/AsyncSceneObjectGroupDeleter.cs | 20 +++++++++----------- OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | 6 +----- 2 files changed, 10 insertions(+), 16 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Environment/Scenes/AsyncSceneObjectGroupDeleter.cs b/OpenSim/Region/Environment/Scenes/AsyncSceneObjectGroupDeleter.cs index 442b40d..97eb7a5 100644 --- a/OpenSim/Region/Environment/Scenes/AsyncSceneObjectGroupDeleter.cs +++ b/OpenSim/Region/Environment/Scenes/AsyncSceneObjectGroupDeleter.cs @@ -126,18 +126,16 @@ namespace OpenSim.Region.Environment.Scenes "[SCENE]: Sending deleted object to user's inventory, {0} item(s) remaining.", left); x = m_inventoryDeletes.Dequeue(); - if (!x.objectGroup.IsDeleted) + + try + { + m_scene.DeleteToInventory(x.destination, + x.folderID, x.objectGroup, x.remoteClient, + x.permissionToDelete); + } + catch (Exception e) { - try - { - m_scene.DeleteToInventory(x.destination, - x.folderID, x.objectGroup, x.remoteClient, - x.permissionToDelete); - } - catch (Exception e) - { - m_log.DebugFormat("Exception background deleting object: "+e.ToString()); - } + m_log.DebugFormat("Exception background deleting object: "+e.ToString()); } return true; diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index cc8501d..5dd1654 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs @@ -1763,11 +1763,7 @@ namespace OpenSim.Region.Environment.Scenes } } } - - // Finally remove the item, for reals this time. - if (permissionToDelete) - DeleteSceneObject(objectGroup, false); - + return assetID; } -- cgit v1.1