From a104cc2c629add78e1f73e71f5aa1f65e3f2857c Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Wed, 19 Nov 2008 01:37:39 +0000 Subject: Fix deleting object that have been persisted already from the DB --- OpenSim/Region/Environment/Scenes/AsyncSceneObjectGroupDeleter.cs | 4 ++++ OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Environment/Scenes/AsyncSceneObjectGroupDeleter.cs b/OpenSim/Region/Environment/Scenes/AsyncSceneObjectGroupDeleter.cs index 58e0ca3..a9fa879 100644 --- a/OpenSim/Region/Environment/Scenes/AsyncSceneObjectGroupDeleter.cs +++ b/OpenSim/Region/Environment/Scenes/AsyncSceneObjectGroupDeleter.cs @@ -42,6 +42,7 @@ namespace OpenSim.Region.Environment.Scenes public IClientAPI remoteClient; public SceneObjectGroup objectGroup; public UUID folderID; + public bool permissionToDelete; } /// @@ -87,6 +88,7 @@ namespace OpenSim.Region.Environment.Scenes dtis.folderID = folderID; dtis.objectGroup = objectGroup; dtis.remoteClient = remoteClient; + dtis.permissionToDelete = permissionToDelete; m_inventoryDeletes.Enqueue(dtis); } @@ -127,6 +129,8 @@ namespace OpenSim.Region.Environment.Scenes try { + if (x.permissionToDelete) + m_scene.DeleteFromStorage(x.objectGroup.UUID); m_scene.DeleteToInventory(x.destination, x.folderID, x.objectGroup, x.remoteClient); } catch (Exception e) diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 5bfa1eb..324e38c 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs @@ -1638,8 +1638,9 @@ namespace OpenSim.Region.Environment.Scenes /// /// /// + /// public virtual UUID DeleteToInventory(int destination, UUID folderID, - SceneObjectGroup objectGroup, IClientAPI remoteClient) + SceneObjectGroup objectGroup, IClientAPI remoteClient) { UUID assetID = UUID.Zero; -- cgit v1.1