aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/AssetService
diff options
context:
space:
mode:
authorMelanie2010-05-09 17:56:52 +0100
committerMelanie2010-05-09 17:56:52 +0100
commit60357d3778c95a47481f790803b7af39c70cde9c (patch)
treecc49f9da3a6907c32d3e8de31c1d811b11477d30 /OpenSim/Services/AssetService
parentAdd a field asset_flags and a corresponding enum to the asset database. This (diff)
downloadopensim-SC-60357d3778c95a47481f790803b7af39c70cde9c.zip
opensim-SC-60357d3778c95a47481f790803b7af39c70cde9c.tar.gz
opensim-SC-60357d3778c95a47481f790803b7af39c70cde9c.tar.bz2
opensim-SC-60357d3778c95a47481f790803b7af39c70cde9c.tar.xz
Implement the "delete" path for assets. Adds a new option to allow remote asset deletion in robust handler.
Diffstat (limited to 'OpenSim/Services/AssetService')
-rw-r--r--OpenSim/Services/AssetService/AssetService.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/OpenSim/Services/AssetService/AssetService.cs b/OpenSim/Services/AssetService/AssetService.cs
index 2114933..4fc38f3 100644
--- a/OpenSim/Services/AssetService/AssetService.cs
+++ b/OpenSim/Services/AssetService/AssetService.cs
@@ -156,6 +156,17 @@ namespace OpenSim.Services.AssetService
156 156
157 public bool Delete(string id) 157 public bool Delete(string id)
158 { 158 {
159 UUID assetID;
160 if (!UUID.TryParse(id, out assetID))
161 return false;
162
163 AssetBase asset = m_Database.GetAsset(assetID);
164 if (asset == null)
165 return false;
166
167 if ((int)(asset.Flags & AssetFlags.Maptile) != 0)
168 return m_Database.Delete(id);
169
159 return false; 170 return false;
160 } 171 }
161 172