From a2d544c9383391f483bdfb82026e2ebc9c88388f Mon Sep 17 00:00:00 2001 From: Mic Bowman Date: Wed, 25 Apr 2012 11:54:57 -0700 Subject: Add a configuration switch to turn on/off the use of the trash folder when deleting objects from a scene. The use of the trash folder causes assets to be created and stored everytime you delete an object from the scene (slows down the delete and adds mostly useless assets to your database). Default is on (use the trash folder) which is the standard behavior. --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 2 +- OpenSim/Region/Framework/Scenes/Scene.cs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 10b25ed..816d3b6 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -1988,7 +1988,7 @@ namespace OpenSim.Region.Framework.Scenes } } - if (permissionToTake) + if (permissionToTake && (action != DeRezAction.Delete || this.m_useTrashOnDelete)) { m_asyncSceneObjectDeleter.DeleteToInventory( action, destinationID, deleteGroups, remoteClient, diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index a87dfb7..7a2b2ed 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -103,6 +103,7 @@ namespace OpenSim.Region.Framework.Scenes public bool m_trustBinaries; public bool m_allowScriptCrossings; public bool m_useFlySlow; + public bool m_useTrashOnDelete = true; /// /// Temporarily setting to trigger appearance resends at 60 second intervals. @@ -709,6 +710,7 @@ namespace OpenSim.Region.Framework.Scenes m_clampPrimSize = true; } + m_useTrashOnDelete = startupConfig.GetBoolean("UseTrashOnDelete",m_useTrashOnDelete); m_trustBinaries = startupConfig.GetBoolean("TrustBinaries", m_trustBinaries); m_allowScriptCrossings = startupConfig.GetBoolean("AllowScriptCrossing", m_allowScriptCrossings); m_dontPersistBefore = -- cgit v1.1