From b5d53bb7415964397684f2114faa3821c2d9d7f6 Mon Sep 17 00:00:00 2001 From: Carl Johnsen Date: Mon, 3 Feb 2025 13:53:06 +0100 Subject: [PATCH] Found a progress print that wasn't properly guarded by the commandline option --- Tools/RemoteSynchronization/Program.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Tools/RemoteSynchronization/Program.cs b/Tools/RemoteSynchronization/Program.cs index 50425d7c8..0ad3cba88 100644 --- a/Tools/RemoteSynchronization/Program.cs +++ b/Tools/RemoteSynchronization/Program.cs @@ -470,10 +470,11 @@ destination will be verified before being overwritten (if they seemingly match). foreach (var f in files) { - if (n > 1) + if (n > 1 && GlobalConfig.Progress) { Console.Write($"\rDeleting: {i}/{n}"); } + try { if (GlobalConfig.DryRun) @@ -490,13 +491,15 @@ destination will be verified before being overwritten (if they seemingly match). { Duplicati.Library.Logging.Log.WriteErrorMessage(LOGTAG, "rsync", e, "Error deleting {0}: {1}", f.Name, e.Message); } + i++; } sw.Stop(); Duplicati.Library.Logging.Log.WriteProfilingMessage(LOGTAG, "rsync", "Delete: {0} ms", sw.ElapsedMilliseconds); - Console.WriteLine($"\rDeleting: {n}/{n}"); + if (GlobalConfig.Progress) + Console.WriteLine($"\rDeleting: {n}/{n}"); return successful_deletes; }