Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

accounting: remove new line from end of --stats-one-line display

Nick Craig-Wood05bea46c3ed9
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