aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Server/Handlers')
-rw-r--r--OpenSim/Server/Handlers/Asset/AssetServerDeleteHandler.cs17
1 files changed, 14 insertions, 3 deletions
diff --git a/OpenSim/Server/Handlers/Asset/AssetServerDeleteHandler.cs b/OpenSim/Server/Handlers/Asset/AssetServerDeleteHandler.cs
index 0cfe5b1..9a8aee6 100644
--- a/OpenSim/Server/Handlers/Asset/AssetServerDeleteHandler.cs
+++ b/OpenSim/Server/Handlers/Asset/AssetServerDeleteHandler.cs
@@ -44,7 +44,7 @@ namespace OpenSim.Server.Handlers.Asset
44{ 44{
45 public class AssetServerDeleteHandler : BaseStreamHandler 45 public class AssetServerDeleteHandler : BaseStreamHandler
46 { 46 {
47 // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 47 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
48 48
49 private IAssetService m_AssetService; 49 private IAssetService m_AssetService;
50 protected bool m_allowDelete; 50 protected bool m_allowDelete;
@@ -65,11 +65,22 @@ namespace OpenSim.Server.Handlers.Asset
65 65
66 if (p.Length > 0 && m_allowDelete) 66 if (p.Length > 0 && m_allowDelete)
67 { 67 {
68 result = m_AssetService.Delete(p[0]); 68 string assetID = p[0];
69
70 AssetBase asset = m_AssetService.Get(assetID);
71 if (asset != null && (int)(asset.Flags & AssetFlags.Maptile) != 0)
72 {
73 result = m_AssetService.Delete(assetID);
74 }
75 else
76 {
77 m_log.DebugFormat(
78 "[ASSET SERVER DELETE HANDLER]: Request to delete asset {0}, but flags are not Maptile", assetID);
79 }
69 } 80 }
70 81
71 XmlSerializer xs = new XmlSerializer(typeof(bool)); 82 XmlSerializer xs = new XmlSerializer(typeof(bool));
72 return ServerUtils.SerializeResult(xs, result); 83 return ServerUtils.SerializeResult(xs, result);
73 } 84 }
74 } 85 }
75} 86} \ No newline at end of file