diff options
author | Kenneth Skovhede <kenneth@hexad.dk> | 2017-04-06 13:37:42 +0300 |
---|---|---|
committer | Kenneth Skovhede <kenneth@hexad.dk> | 2017-04-06 13:37:42 +0300 |
commit | 3c45acd7459df626831b249a5e7d1259ce16c9e1 (patch) | |
tree | 3c207515235064faf869e29332391363efe9670a | |
parent | fe96e3a021f54299dfab428e4368c5aeb34ce6c5 (diff) |
Made the order of picking compositional filter elements more explicit to avoid returning null values unless both filters are null
-rw-r--r-- | Duplicati/Library/Utility/JoinedFilterExpression.cs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Duplicati/Library/Utility/JoinedFilterExpression.cs b/Duplicati/Library/Utility/JoinedFilterExpression.cs index ff4cc5c34..9ffaf8b4b 100644 --- a/Duplicati/Library/Utility/JoinedFilterExpression.cs +++ b/Duplicati/Library/Utility/JoinedFilterExpression.cs @@ -39,9 +39,15 @@ namespace Duplicati.Library.Utility public static IFilter Join(IFilter first, IFilter second)
{
- if (first == null || first.Empty)
+ if (first == null && second == null)
+ return null;
+ else if (first == null)
return second;
- else if (second == null || second.Empty)
+ else if (second == null)
+ return first;
+ else if (first.Empty)
+ return second;
+ else if (second.Empty)
return first;
else
{
|