aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/AssetService/XAssetService.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-11-02 00:02:10 +0000
committerJustin Clark-Casey (justincc)2012-11-02 00:02:10 +0000
commit462ad336dcd59dfc4325aed9e6d635aa866cd094 (patch)
tree627f81bf796e3bf8885b05a83728e59ccf0c38d4 /OpenSim/Services/AssetService/XAssetService.cs
parentComment out checks not to overwrite existing IAR/OAR files for now on "save i... (diff)
downloadopensim-SC-462ad336dcd59dfc4325aed9e6d635aa866cd094.zip
opensim-SC-462ad336dcd59dfc4325aed9e6d635aa866cd094.tar.gz
opensim-SC-462ad336dcd59dfc4325aed9e6d635aa866cd094.tar.bz2
opensim-SC-462ad336dcd59dfc4325aed9e6d635aa866cd094.tar.xz
Move check to allow only deletion of maptiles up to AssetServerDeleteHandler from AssetService.
This allows us to use a common check for both AssetService and XAssetService. It also allows future console commands to delete an asset. As before, deletion of maptile assets is not allowed remotely unless this is explicitly configured.
Diffstat (limited to 'OpenSim/Services/AssetService/XAssetService.cs')
-rw-r--r--OpenSim/Services/AssetService/XAssetService.cs18
1 files changed, 2 insertions, 16 deletions
diff --git a/OpenSim/Services/AssetService/XAssetService.cs b/OpenSim/Services/AssetService/XAssetService.cs
index e62bcb5..a1d10ed 100644
--- a/OpenSim/Services/AssetService/XAssetService.cs
+++ b/OpenSim/Services/AssetService/XAssetService.cs
@@ -194,21 +194,7 @@ namespace OpenSim.Services.AssetService
194 if (!UUID.TryParse(id, out assetID)) 194 if (!UUID.TryParse(id, out assetID))
195 return false; 195 return false;
196 196
197 AssetBase asset = m_Database.GetAsset(assetID); 197 return m_Database.Delete(id);
198 if (asset == null)
199 return false;
200
201 if ((int)(asset.Flags & AssetFlags.Maptile) != 0)
202 {
203 return m_Database.Delete(id);
204 }
205 else
206 {
207 m_log.DebugFormat("[XASSET SERVICE]: Request to delete asset {0}, but flags are not Maptile", id);
208 }
209
210 return false;
211 } 198 }
212 } 199 }
213} 200} \ No newline at end of file
214