Ensure `SqliteConnection`s are initialised with absolute paths
resolves #3796
This commit is contained in:
parent
cc59818d6d
commit
ffa5738ffc
|
@ -1,6 +1,8 @@
|
|||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
using BizHawk.Common.PathExtensions;
|
||||
|
||||
using Microsoft.Data.Sqlite;
|
||||
|
||||
namespace BizHawk.Client.Common
|
||||
|
@ -33,7 +35,10 @@ namespace BizHawk.Client.Common
|
|||
try
|
||||
{
|
||||
_dbConnection?.Dispose();
|
||||
_dbConnection = new(new SqliteConnectionStringBuilder { DataSource = name }.ToString());
|
||||
_dbConnection = new(new SqliteConnectionStringBuilder
|
||||
{
|
||||
DataSource = name.MakeAbsolute(),
|
||||
}.ToString());
|
||||
_dbConnection.Open();
|
||||
using var initCmds = new SqliteCommand(null, _dbConnection);
|
||||
// Allows for reads and writes to happen at the same time
|
||||
|
|
Loading…
Reference in New Issue