From d19e7f443032a637cab2ebda97cf45ed93dd81cb Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Wed, 23 Apr 2025 12:12:38 +0200 Subject: [PATCH] More safeguards against getting an unknown remote file --- .../Library/Main/Operation/Backup/RecreateMissingIndexFiles.cs | 1 + Duplicati/Library/Main/Operation/Backup/SpillCollectorProcess.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/Duplicati/Library/Main/Operation/Backup/RecreateMissingIndexFiles.cs b/Duplicati/Library/Main/Operation/Backup/RecreateMissingIndexFiles.cs index 88be0f140..608ff7b7e 100644 --- a/Duplicati/Library/Main/Operation/Backup/RecreateMissingIndexFiles.cs +++ b/Duplicati/Library/Main/Operation/Backup/RecreateMissingIndexFiles.cs @@ -47,6 +47,7 @@ internal static class RecreateMissingIndexFiles return; await database.UpdateRemoteVolumeAsync(w.RemoteFilename, RemoteVolumeState.Uploading, -1, null).ConfigureAwait(false); + await database.CommitTransactionAsync("RecreateMissingIndexFile").ConfigureAwait(false); await backendManager.PutAsync(w, null, null, false, () => database.FlushBackendMessagesAndCommitAsync(backendManager), taskreader.ProgressToken).ConfigureAwait(false); } } diff --git a/Duplicati/Library/Main/Operation/Backup/SpillCollectorProcess.cs b/Duplicati/Library/Main/Operation/Backup/SpillCollectorProcess.cs index 06b6326cf..46d7fb02c 100644 --- a/Duplicati/Library/Main/Operation/Backup/SpillCollectorProcess.cs +++ b/Duplicati/Library/Main/Operation/Backup/SpillCollectorProcess.cs @@ -172,6 +172,7 @@ namespace Duplicati.Library.Main.Operation.Backup await database.AddIndexBlockLinkAsync(indexVolumeCopy.VolumeID, target.BlockVolume.VolumeID).ConfigureAwait(false); } + await database.CommitTransactionAsync("UploadSpillVolume").ConfigureAwait(false); await backendManager.PutAsync(target.BlockVolume, indexVolumeCopy, null, false, () => database.FlushBackendMessagesAndCommitAsync(backendManager), taskreader.ProgressToken).ConfigureAwait(false); } }