diff --git a/OpenSim/Data/SQLite/SQLiteAssetData.cs b/OpenSim/Data/SQLite/SQLiteAssetData.cs index 9b938fab73..2783ba1556 100644 --- a/OpenSim/Data/SQLite/SQLiteAssetData.cs +++ b/OpenSim/Data/SQLite/SQLiteAssetData.cs @@ -207,20 +207,6 @@ namespace OpenSim.Data.SQLite } } - /// - /// Delete an asset from database - /// - /// - public void DeleteAsset(UUID uuid) - { - using (SqliteCommand cmd = new SqliteCommand(DeleteAssetSQL, m_conn)) - { - cmd.Parameters.Add(new SqliteParameter(":UUID", uuid.ToString())); - - cmd.ExecuteNonQuery(); - } - } - /// /// /// @@ -340,7 +326,22 @@ namespace OpenSim.Data.SQLite public override bool Delete(string id) { - return false; + UUID assetID; + + if (!UUID.TryParse(id, out assetID)) + return false; + + lock (this) + { + using (SqliteCommand cmd = new SqliteCommand(DeleteAssetSQL, m_conn)) + { + cmd.Parameters.Add(new SqliteParameter(":UUID", assetID.ToString())); + + cmd.ExecuteNonQuery(); + } + } + + return true; } #endregion