From ebdddebeb1b072abd4674ed64f5f132ca620e770 Mon Sep 17 00:00:00 2001 From: Carl Johnsen Date: Wed, 11 Jun 2025 09:01:12 +0200 Subject: [PATCH] Pragmas that change the safety level of a connection cannot be performed within a transaction --- Duplicati/Library/SQLiteHelper/SQLiteLoader.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/Duplicati/Library/SQLiteHelper/SQLiteLoader.cs b/Duplicati/Library/SQLiteHelper/SQLiteLoader.cs index 5c2bc7ecf..b91db4d51 100644 --- a/Duplicati/Library/SQLiteHelper/SQLiteLoader.cs +++ b/Duplicati/Library/SQLiteHelper/SQLiteLoader.cs @@ -147,9 +147,7 @@ namespace Duplicati.Library.SQLiteHelper return con; using (var cmd = con.CreateCommand()) - using (var transaction = con.BeginTransaction(deferred: true)) { - cmd.Transaction = transaction; foreach (var opt in opts.Split([';'], StringSplitOptions.RemoveEmptyEntries)) { Logging.Log.WriteVerboseMessage(LOGTAG, "CustomSQLiteOption", @"Setting custom SQLite option '{0}'.", opt); @@ -163,7 +161,6 @@ namespace Duplicati.Library.SQLiteHelper Logging.Log.WriteWarningMessage(LOGTAG, "CustomSQLiteOption", ex, @"Error setting custom SQLite option '{0}'.", opt); } } - await transaction.CommitAsync(); } return con; }