Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/duplicati/duplicati.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Hsu <kennethhsu@gmail.com>2020-01-26 04:07:02 +0300
committerKenneth Hsu <kennethhsu@gmail.com>2020-01-26 04:07:02 +0300
commit3551238000d06c30030cfef58b4ca4f5b99b823e (patch)
tree9ad89d2d495c4143fa7698429afd4b235f179657 /Duplicati/CommandLine
parent22d34f60c0b45bf282d784d669e1e1b312d4b7b7 (diff)
Remove redundant calls to String.Format.
Diffstat (limited to 'Duplicati/CommandLine')
-rw-r--r--Duplicati/CommandLine/BackendTester/Program.cs12
-rw-r--r--Duplicati/CommandLine/BackendTool/Program.cs4
-rw-r--r--Duplicati/CommandLine/Commands.cs8
-rw-r--r--Duplicati/CommandLine/Program.cs2
4 files changed, 13 insertions, 13 deletions
diff --git a/Duplicati/CommandLine/BackendTester/Program.cs b/Duplicati/CommandLine/BackendTester/Program.cs
index 3f4285ef0..8515841a3 100644
--- a/Duplicati/CommandLine/BackendTester/Program.cs
+++ b/Duplicati/CommandLine/BackendTester/Program.cs
@@ -149,11 +149,11 @@ namespace Duplicati.CommandLine.BackendTester
}
string allowedChars = ValidFilenameChars;
- if (options.ContainsKey("extended-chars"))
- {
- allowedChars += String.IsNullOrEmpty(options["extended-chars"]) ? ExtendedChars : options["extended-chars"];
- }
-
+ if (options.ContainsKey("extended-chars"))
+ {
+ allowedChars += String.IsNullOrEmpty(options["extended-chars"]) ? ExtendedChars : options["extended-chars"];
+ }
+
bool autoCreateFolders = Library.Utility.Utility.ParseBoolOption(options, "auto-create-folder");
string disabledModulesValue;
@@ -489,7 +489,7 @@ namespace Duplicati.CommandLine.BackendTester
while (e.InnerException != null)
{
e = e.InnerException;
- Console.WriteLine(string.Format(" Inner exception: {0}", e));
+ Console.WriteLine(" Inner exception: {0}", e);
}
}
else
diff --git a/Duplicati/CommandLine/BackendTool/Program.cs b/Duplicati/CommandLine/BackendTool/Program.cs
index 8cbc2723d..0b30706cd 100644
--- a/Duplicati/CommandLine/BackendTool/Program.cs
+++ b/Duplicati/CommandLine/BackendTool/Program.cs
@@ -100,10 +100,10 @@ namespace Duplicati.CommandLine.BackendTool
{
if (args.Count != 2)
throw new UserInformationException(string.Format("too many arguments: {0}", string.Join(",", args)), "BackendToolTooManyArguments");
- Console.WriteLine(string.Format("{0}\t{1}\t{2}\t{3}", "Name", "Dir/File", "LastChange", "Size"));
+ Console.WriteLine("{0}\t{1}\t{2}\t{3}", "Name", "Dir/File", "LastChange", "Size");
foreach(var e in backend.List())
- Console.WriteLine(string.Format("{0}\t{1}\t{2}\t{3}", e.Name, e.IsFolder ? "Dir" : "File", e.LastModification, e.Size < 0 ? "" : Library.Utility.Utility.FormatSizeString(e.Size)));
+ Console.WriteLine("{0}\t{1}\t{2}\t{3}", e.Name, e.IsFolder ? "Dir" : "File", e.LastModification, e.Size < 0 ? "" : Library.Utility.Utility.FormatSizeString(e.Size));
return 0;
}
diff --git a/Duplicati/CommandLine/Commands.cs b/Duplicati/CommandLine/Commands.cs
index ba26a4948..0e60ffc71 100644
--- a/Duplicati/CommandLine/Commands.cs
+++ b/Duplicati/CommandLine/Commands.cs
@@ -19,8 +19,8 @@ using System;
using System.Linq;
using System.Collections.Generic;
using System.IO;
-using Duplicati.Library.Common.IO;
-
+using Duplicati.Library.Common.IO;
+
namespace Duplicati.CommandLine
{
public static class Commands
@@ -234,7 +234,7 @@ namespace Duplicati.CommandLine
}
}
- public static List<string> PrefixArgsWithAsterisk(IList<string> argList)
+ public static List<string> PrefixArgsWithAsterisk(IList<string> argList)
{
// Prefix all filenames with "*/" so we search all folders
var specialArgChars = new[] { '*', '?', Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar };
@@ -414,7 +414,7 @@ namespace Duplicati.CommandLine
outwriter.WriteLine(Strings.Program.DeletedBackups);
foreach(var f in res.DeletedSets)
- outwriter.WriteLine(string.Format("{0}: {1}", f.Item1, f.Item2));
+ outwriter.WriteLine("{0}: {1}", f.Item1, f.Item2);
}
}
diff --git a/Duplicati/CommandLine/Program.cs b/Duplicati/CommandLine/Program.cs
index b5e205f17..512d091c0 100644
--- a/Duplicati/CommandLine/Program.cs
+++ b/Duplicati/CommandLine/Program.cs
@@ -187,7 +187,7 @@ namespace Duplicati.CommandLine
Duplicati.Library.Utility.TempFile.RemoveOldApplicationTempFiles((path, ex) =>
{
if (showDeletionErrors)
- outwriter.WriteLine(string.Format("Failed to delete temp file: {0}", path));
+ outwriter.WriteLine("Failed to delete temp file: {0}", path);
});
string command = cargs[0];