diff options
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteAssetData.cs | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteAssetData.cs b/OpenSim/Data/SQLite/SQLiteAssetData.cs index 9b938fa..2783ba1 100644 --- a/OpenSim/Data/SQLite/SQLiteAssetData.cs +++ b/OpenSim/Data/SQLite/SQLiteAssetData.cs | |||
@@ -208,20 +208,6 @@ namespace OpenSim.Data.SQLite | |||
208 | } | 208 | } |
209 | 209 | ||
210 | /// <summary> | 210 | /// <summary> |
211 | /// Delete an asset from database | ||
212 | /// </summary> | ||
213 | /// <param name="uuid"></param> | ||
214 | public void DeleteAsset(UUID uuid) | ||
215 | { | ||
216 | using (SqliteCommand cmd = new SqliteCommand(DeleteAssetSQL, m_conn)) | ||
217 | { | ||
218 | cmd.Parameters.Add(new SqliteParameter(":UUID", uuid.ToString())); | ||
219 | |||
220 | cmd.ExecuteNonQuery(); | ||
221 | } | ||
222 | } | ||
223 | |||
224 | /// <summary> | ||
225 | /// | 211 | /// |
226 | /// </summary> | 212 | /// </summary> |
227 | /// <param name="row"></param> | 213 | /// <param name="row"></param> |
@@ -340,7 +326,22 @@ namespace OpenSim.Data.SQLite | |||
340 | 326 | ||
341 | public override bool Delete(string id) | 327 | public override bool Delete(string id) |
342 | { | 328 | { |
343 | return false; | 329 | UUID assetID; |
330 | |||
331 | if (!UUID.TryParse(id, out assetID)) | ||
332 | return false; | ||
333 | |||
334 | lock (this) | ||
335 | { | ||
336 | using (SqliteCommand cmd = new SqliteCommand(DeleteAssetSQL, m_conn)) | ||
337 | { | ||
338 | cmd.Parameters.Add(new SqliteParameter(":UUID", assetID.ToString())); | ||
339 | |||
340 | cmd.ExecuteNonQuery(); | ||
341 | } | ||
342 | } | ||
343 | |||
344 | return true; | ||
344 | } | 345 | } |
345 | 346 | ||
346 | #endregion | 347 | #endregion |