From 28b3b1c62d9fad9811986aad185121fed3f3b755 Mon Sep 17 00:00:00 2001
From: onefang
Date: Sun, 19 May 2019 22:03:18 +1000
Subject: Move db directory out of tree.

---
 OpenSim/Data/SQLite/SQLiteAssetData.cs               | 4 ++--
 OpenSim/Data/Tests/BasicDataServiceTest.cs           | 2 +-
 OpenSim/Data/Tests/Resources/TestDataConnections.ini | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

(limited to 'OpenSim/Data')

diff --git a/OpenSim/Data/SQLite/SQLiteAssetData.cs b/OpenSim/Data/SQLite/SQLiteAssetData.cs
index 966d0b8..51d1030 100644
--- a/OpenSim/Data/SQLite/SQLiteAssetData.cs
+++ b/OpenSim/Data/SQLite/SQLiteAssetData.cs
@@ -86,7 +86,7 @@ namespace OpenSim.Data.SQLite
 
             if (dbconnect == string.Empty)
             {
-                dbconnect = "URI=file:Asset.db,version=3";
+                dbconnect = "URI=file:" + Util.dbDir() + "Asset.db,version=3";
             }
             m_conn = new SqliteConnection(dbconnect);
             m_conn.Open();
@@ -360,7 +360,7 @@ namespace OpenSim.Data.SQLite
         /// </summary>
         override public void Initialise()
         {
-            Initialise("URI=file:Asset.db,version=3");
+            Initialise("URI=file:" + Util.dbDir() + "Asset.db,version=3");
         }
 
         /// <summary>
diff --git a/OpenSim/Data/Tests/BasicDataServiceTest.cs b/OpenSim/Data/Tests/BasicDataServiceTest.cs
index 79691e4..580e7aa 100644
--- a/OpenSim/Data/Tests/BasicDataServiceTest.cs
+++ b/OpenSim/Data/Tests/BasicDataServiceTest.cs
@@ -106,7 +106,7 @@ namespace OpenSim.Data.Tests
                 if (String.IsNullOrEmpty(m_connStr))
                 {
                     m_file = Path.GetTempFileName() + ".db";
-                    m_connStr = "URI=file:" + m_file + ",version=3";
+                    m_connStr = "URI=file:" + Util.dbDir() + "/" + m_file + ",version=3";
                 }
             }
 
diff --git a/OpenSim/Data/Tests/Resources/TestDataConnections.ini b/OpenSim/Data/Tests/Resources/TestDataConnections.ini
index 7b55467..2ddec8b 100644
--- a/OpenSim/Data/Tests/Resources/TestDataConnections.ini
+++ b/OpenSim/Data/Tests/Resources/TestDataConnections.ini
@@ -16,9 +16,9 @@
 ; file for the DB.  If you want the resulting DB to persist (e.g. for performance testing,
 ; when filling up the tables can take a long time), explicitly specify a conn string like this: 
 
-; SqliteConnection="URI=file:<path_to_your_file>,version=3"
+; SqliteConnection="URI=file:../../db/<path_to_your_file>,version=3"
 
 [TestConnections]
 MySqlConnection="Server=localhost;Port=3306;Database=opensim-nunit;User ID=opensim-nunit;Password=opensim-nunit;"
 SqlConnection="Server=.\SQL2008;Database=opensim-nunit;Trusted_Connection=True;"
-SqliteConnection="URI=file:opensim-nunit.db,version=3"
\ No newline at end of file
+SqliteConnection="URI=file:../../db/opensim-nunit.db,version=3"
-- 
cgit v1.1