diff options
author | Dean Ferreyra <dean@octw.com> | 2020-09-08 00:45:08 +0300 |
---|---|---|
committer | Dean Ferreyra <dean@octw.com> | 2020-09-08 00:45:08 +0300 |
commit | 78555241c1a2a0764acd0d022c101ce846f0246f (patch) | |
tree | 74d3eabd1c6487504cee5e690824d08e3bdec33a /Duplicati/CommandLine | |
parent | 536ce69668658ad21b0f86a3e55a7897d17acfbe (diff) |
Address review comments from @warwickmm
Diffstat (limited to 'Duplicati/CommandLine')
-rw-r--r-- | Duplicati/CommandLine/Commands.cs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Duplicati/CommandLine/Commands.cs b/Duplicati/CommandLine/Commands.cs index 1f5b0b1d7..74523762c 100644 --- a/Duplicati/CommandLine/Commands.cs +++ b/Duplicati/CommandLine/Commands.cs @@ -240,8 +240,7 @@ namespace Duplicati.CommandLine /// For bare file names with no wildcards, replace argument with
/// the equivalent of prefixing with "*/" so we search all folders.
/// </summary>
- public static IEnumerable<string> PrefixArgsWithAsterisk(IEnumerable<string> argList) =>
- argList.Select(PrefixArgWithAsterisk);
+ public static IEnumerable<string> PrefixArgsWithAsterisk(IEnumerable<string> argList) => argList.Select(PrefixArgWithAsterisk);
/// <summary>
/// For bare file names with no wildcards, return argument with
@@ -272,8 +271,7 @@ namespace Duplicati.CommandLine /// For folders, replace argument with the equivalent of suffixing
/// with "*" so we restore contents in the folder.
/// </summary>
- public static IEnumerable<string> SuffixArgsWithAsterisk(IEnumerable<string> argList) =>
- argList.Select(SuffixArgWithAsterisk);
+ public static IEnumerable<string> SuffixArgsWithAsterisk(IEnumerable<string> argList) => argList.Select(SuffixArgWithAsterisk);
/// <summary>
/// For folders, return argument with the equivalent of suffixing
@@ -339,7 +337,7 @@ namespace Duplicati.CommandLine options["version"] = v.ToString();
}
}
- else if (args[0].IndexOfAny(new char[] { '*', '?' }) < 0 && !args[0].StartsWith("[", StringComparison.Ordinal) && !args[0].StartsWith("@", StringComparison.Ordinal))
+ else if (!ContainsWildcards(args[0]) && !args[0].StartsWith("[", StringComparison.Ordinal) && !args[0].StartsWith("@", StringComparison.Ordinal))
{
try
{
|