diff options
author | Kenneth Hsu <kennethhsu@gmail.com> | 2021-05-19 07:28:23 +0300 |
---|---|---|
committer | Kenneth Hsu <kennethhsu@gmail.com> | 2021-05-20 23:42:41 +0300 |
commit | e90eb3b2a3ea0b76a157868870b4fb8a004a34c3 (patch) | |
tree | 48042700557e055b2ebd0f0893ba3b2c61d78da8 /Duplicati/Library/Interface | |
parent | 0a43410535d89e3e8ca93e78f799b9cec8812310 (diff) |
Create custom Exception for remote list verification failures.
Previously, we would catch any Exception thrown by VerifyRemoteList and
perform an auto-cleanup (if specified in the options). However, we
should only perform the auto-cleanup if VerifyRemoteList detected an
issue with the uploaded files. Otherwise, an unrelated exception can
cause the database repair to be performed unnecessarily. In the case of
a connection issue, this can leave the database in a corrupted state.
This fixes #4516.
Diffstat (limited to 'Duplicati/Library/Interface')
-rw-r--r-- | Duplicati/Library/Interface/CustomExceptions.cs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Duplicati/Library/Interface/CustomExceptions.cs b/Duplicati/Library/Interface/CustomExceptions.cs index 2e0c90262..1dbc0ff63 100644 --- a/Duplicati/Library/Interface/CustomExceptions.cs +++ b/Duplicati/Library/Interface/CustomExceptions.cs @@ -183,4 +183,20 @@ namespace Duplicati.Library.Interface AbortReason = reason;
}
}
+
+ /// <summary>
+ /// An exception indicating that verification of uploaded volumes has failed
+ /// due to extra, missing, or duplicate files.
+ /// </summary>
+ [Serializable]
+ public class RemoteListVerificationException : UserInformationException
+ {
+ public RemoteListVerificationException(string message, string helpId)
+ : base(message, helpId)
+ {}
+
+ public RemoteListVerificationException(string message, string helpId, Exception innerException)
+ : base(message, helpId, innerException)
+ {}
+ }
}
|