From e2564f25639fc873fd95fb14118453659a3504c3 Mon Sep 17 00:00:00 2001 From: Homer Horwitz Date: Thu, 18 Sep 2008 20:15:04 +0000 Subject: Add a db.Dispose before calling Delete on the SQLite database. On Windows, you are not able to delete a file while there is still a handle to it open. --- OpenSim/Data/SQLite/Tests/SQLiteAssetTest.cs | 1 + OpenSim/Data/SQLite/Tests/SQLiteInventoryTest.cs | 1 + OpenSim/Data/SQLite/Tests/SQLiteRegionTest.cs | 3 ++- OpenSim/Data/SQLite/Tests/SQLiteUserTest.cs | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/OpenSim/Data/SQLite/Tests/SQLiteAssetTest.cs b/OpenSim/Data/SQLite/Tests/SQLiteAssetTest.cs index b399543..89bb2ae 100644 --- a/OpenSim/Data/SQLite/Tests/SQLiteAssetTest.cs +++ b/OpenSim/Data/SQLite/Tests/SQLiteAssetTest.cs @@ -56,6 +56,7 @@ namespace OpenSim.Data.SQLite.Tests [TestFixtureTearDown] public void Cleanup() { + db.Dispose(); System.IO.File.Delete(file); } } diff --git a/OpenSim/Data/SQLite/Tests/SQLiteInventoryTest.cs b/OpenSim/Data/SQLite/Tests/SQLiteInventoryTest.cs index 14c4f56..998229f 100644 --- a/OpenSim/Data/SQLite/Tests/SQLiteInventoryTest.cs +++ b/OpenSim/Data/SQLite/Tests/SQLiteInventoryTest.cs @@ -64,6 +64,7 @@ namespace OpenSim.Data.SQLite.Tests [TestFixtureTearDown] public void Cleanup() { + db.Dispose(); System.IO.File.Delete(file); } } diff --git a/OpenSim/Data/SQLite/Tests/SQLiteRegionTest.cs b/OpenSim/Data/SQLite/Tests/SQLiteRegionTest.cs index 6727b87..e827638 100644 --- a/OpenSim/Data/SQLite/Tests/SQLiteRegionTest.cs +++ b/OpenSim/Data/SQLite/Tests/SQLiteRegionTest.cs @@ -55,7 +55,8 @@ namespace OpenSim.Data.SQLite.Tests [TestFixtureTearDown] public void Cleanup() { - // System.IO.File.Delete(file); + db.Dispose(); + System.IO.File.Delete(file); } } } \ No newline at end of file diff --git a/OpenSim/Data/SQLite/Tests/SQLiteUserTest.cs b/OpenSim/Data/SQLite/Tests/SQLiteUserTest.cs index d4aaf99..d9e2867 100644 --- a/OpenSim/Data/SQLite/Tests/SQLiteUserTest.cs +++ b/OpenSim/Data/SQLite/Tests/SQLiteUserTest.cs @@ -55,6 +55,7 @@ namespace OpenSim.Data.SQLite.Tests [TestFixtureTearDown] public void Cleanup() { + db.Dispose(); System.IO.File.Delete(file); } } -- cgit v1.1