Browse Source

open before changing pragmas

cvium 1 year ago
parent
commit
791413a50f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Emby.Server.Implementations/Data/BaseSqliteRepository.cs

+ 1 - 1
Emby.Server.Implementations/Data/BaseSqliteRepository.cs

@@ -101,6 +101,7 @@ namespace Emby.Server.Implementations.Data
         protected SqliteConnection GetConnection(bool readOnly = false)
         {
             var connection = new SqliteConnection($"Filename={DbFilePath}");
+            connection.Open();
 
             if (CacheSize.HasValue)
             {
@@ -134,7 +135,6 @@ namespace Emby.Server.Implementations.Data
 
             connection.Execute("PRAGMA temp_store=" + (int)TempStore);
 
-            connection.Open();
             return connection;
         }