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

size: make output compatible with -P

Nick Craig-Wood0e7c495395ac
diff --git a/cmd/size/size.go b/cmd/size/size.go
index 74414f574..05e570c4e 100644
--- a/cmd/size/size.go
+++ b/cmd/size/size.go
@@ -4,7 +4,6 @@ package size
import (
"context"
"encoding/json"
- "fmt"
"os"
"strconv"
@@ -72,13 +71,13 @@ of the size command.
count := strconv.FormatInt(results.Count, 10)
countSuffix := fs.CountSuffix(results.Count).String()
if count == countSuffix {
- fmt.Printf("Total objects: %s\n", count)
+ operations.SyncPrintf("Total objects: %s\n", count)
} else {
- fmt.Printf("Total objects: %s (%s)\n", countSuffix, count)
+ operations.SyncPrintf("Total objects: %s (%s)\n", countSuffix, count)
}
- fmt.Printf("Total size: %s (%d Byte)\n", fs.SizeSuffix(results.Bytes).ByteUnit(), results.Bytes)
+ operations.SyncPrintf("Total size: %s (%d Byte)\n", fs.SizeSuffix(results.Bytes).ByteUnit(), results.Bytes)
if results.Sizeless > 0 {
- fmt.Printf("Total objects with unknown size: %s (%d)\n", fs.CountSuffix(results.Sizeless), results.Sizeless)
+ operations.SyncPrintf("Total objects with unknown size: %s (%d)\n", fs.CountSuffix(results.Sizeless), results.Sizeless)
}
return nil
})