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

tree: option to print human-readable sizes removed in favor of global option

albertony8c4b06da7921
diff --git a/cmd/tree/tree.go b/cmd/tree/tree.go
index 09ce291c3..f473a7699 100644
--- a/cmd/tree/tree.go
+++ b/cmd/tree/tree.go
@@ -44,7 +44,6 @@ func init() {
flags.StringVarP(cmdFlags, &outFileName, "output", "o", "", "Output to file instead of stdout.")
// Files
flags.BoolVarP(cmdFlags, &opts.ByteSize, "size", "s", false, "Print the size in bytes of each file.")
- flags.BoolVarP(cmdFlags, &opts.UnitSize, "human", "", false, "Print the size in a more human readable way.")
flags.BoolVarP(cmdFlags, &opts.FileMode, "protections", "p", false, "Print the protections for each file.")
// flags.BoolVarP(cmdFlags, &opts.ShowUid, "uid", "", false, "Displays file owner or UID number.")
// flags.BoolVarP(cmdFlags, &opts.ShowGid, "gid", "", false, "Displays file group owner or GID number.")
@@ -109,6 +108,7 @@ short options as they conflict with rclone's short options.
opts.NameSort = sort == "name"
opts.SizeSort = sort == "size"
ci := fs.GetConfig(context.Background())
+ opts.UnitSize = ci.HumanReadable
if opts.DeepLevel == 0 {
opts.DeepLevel = ci.MaxDepth
}