Explorar o código

open before changing pragmas

cvium hai 1 ano
pai
achega
791413a50f
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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)
         protected SqliteConnection GetConnection(bool readOnly = false)
         {
         {
             var connection = new SqliteConnection($"Filename={DbFilePath}");
             var connection = new SqliteConnection($"Filename={DbFilePath}");
+            connection.Open();
 
 
             if (CacheSize.HasValue)
             if (CacheSize.HasValue)
             {
             {
@@ -134,7 +135,6 @@ namespace Emby.Server.Implementations.Data
 
 
             connection.Execute("PRAGMA temp_store=" + (int)TempStore);
             connection.Execute("PRAGMA temp_store=" + (int)TempStore);
 
 
-            connection.Open();
             return connection;
             return connection;
         }
         }