From 70892e8e644df704cbac5f07c0c69409d8a6d2a1 Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Tue, 17 Nov 2015 12:36:00 +0100 Subject: [PATCH] Improved handling for cases where a delete request returns a FileNotFound exception --- Duplicati/Library/Main/BackendManager.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Duplicati/Library/Main/BackendManager.cs b/Duplicati/Library/Main/BackendManager.cs index 6cc86aeb0..f1052c0fd 100644 --- a/Duplicati/Library/Main/BackendManager.cs +++ b/Duplicati/Library/Main/BackendManager.cs @@ -797,11 +797,10 @@ namespace Duplicati.Library.Main } catch (Exception ex) { - var isFileMissingException = ex is Library.Interface.FileMissingException; - var wex = ex as System.Net.WebException; + var isFileMissingException = ex is Library.Interface.FileMissingException || ex is System.IO.FileNotFoundException; var wr = ex as System.Net.WebException == null ? null : (ex as System.Net.WebException).Response as System.Net.HttpWebResponse; - if (ex is Library.Interface.FileMissingException || (wr != null && wr.StatusCode == System.Net.HttpStatusCode.NotFound)) + if (isFileMissingException || (wr != null && wr.StatusCode == System.Net.HttpStatusCode.NotFound)) { m_statwriter.AddWarning(LC.L("Delete operation failed for {0} with FileNotFound, listing contents", item.RemoteFilename), ex); bool success = false;