From 791413a50f3ad8afc0a554f16828e70c3c8752b8 Mon Sep 17 00:00:00 2001 From: cvium Date: Mon, 21 Aug 2023 21:38:16 +0200 Subject: [PATCH] open before changing pragmas --- Emby.Server.Implementations/Data/BaseSqliteRepository.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/Data/BaseSqliteRepository.cs b/Emby.Server.Implementations/Data/BaseSqliteRepository.cs index e257c9edc7..7b3c7b0bb4 100644 --- a/Emby.Server.Implementations/Data/BaseSqliteRepository.cs +++ b/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; }