From 05bea46c3ed94a2673acf3865516a94a64bc7c6a Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Tue, 8 Sep 2020 14:27:42 +0100 Subject: [PATCH] accounting: remove new line from end of --stats-one-line display --- fs/accounting/stats.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/accounting/stats.go b/fs/accounting/stats.go index 357dced2c..fbea0114f 100644 --- a/fs/accounting/stats.go +++ b/fs/accounting/stats.go @@ -272,7 +272,7 @@ func (s *StatsInfo) String() string { } } - _, _ = fmt.Fprintf(buf, "%s%10s / %s, %s, %s, ETA %s%s\n", + _, _ = fmt.Fprintf(buf, "%s%10s / %s, %s, %s, ETA %s%s", dateString, fs.SizeSuffix(s.bytes), fs.SizeSuffix(totalSize).Unit("Bytes"), @@ -283,6 +283,7 @@ func (s *StatsInfo) String() string { ) if !fs.Config.StatsOneLine { + _, _ = buf.WriteRune('\n') errorDetails := "" switch { case s.fatalError: @@ -291,6 +292,7 @@ func (s *StatsInfo) String() string { errorDetails = " (retrying may help)" case s.errors != 0: errorDetails = " (no need to retry)" + } // Add only non zero stats