From 777bc06842243ea33c88e2f61a21806b6819eb90 Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Mon, 27 Oct 2025 11:37:10 +0100 Subject: [PATCH] Report remote filename on hash errors This PR changes the reported filename to use the remote filename instead of the random temporary filename that has little value to the user as the file is deleted immediately after the error is raised. --- Duplicati/Library/Main/Backend/BackendManager.GetOperation.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Duplicati/Library/Main/Backend/BackendManager.GetOperation.cs b/Duplicati/Library/Main/Backend/BackendManager.GetOperation.cs index 49f4b1ae7..c0fb85eed 100644 --- a/Duplicati/Library/Main/Backend/BackendManager.GetOperation.cs +++ b/Duplicati/Library/Main/Backend/BackendManager.GetOperation.cs @@ -92,7 +92,7 @@ partial class BackendManager throw new Exception(Strings.Controller.DownloadedFileSizeError(RemoteFilename, dataSizeDownloaded, Size)); if (!string.IsNullOrEmpty(Hash) && fileHash != Hash) - throw new HashMismatchException(Strings.Controller.HashMismatchError(tmpfile, Hash, fileHash)); + throw new HashMismatchException(Strings.Controller.HashMismatchError(RemoteFilename, Hash, fileHash)); } // Perform decryption after hash validation, if needed