"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
fs: Add --stats-file-name-length to specify the printed file name length for stats
Will Gunn5c7e8d5a2bce
diff --git a/fs/accounting.go b/fs/accounting.goindex 41cb6b74a..a80da7ec0 100644--- a/fs/accounting.go+++ b/fs/accounting.go@@ -572,9 +572,11 @@ func (acc *Account) String() string {}}name := []rune(acc.name)- if len(name) > 40 {- where := len(name) - 37- name = append([]rune{'.', '.', '.'}, name[where:]...)+ if Config.StatsFileNameLength > 0 {+ if len(name) > Config.StatsFileNameLength {+ where := len(name) - Config.StatsFileNameLength+ name = append([]rune{'.', '.', '.'}, name[where:]...)+ }}if Config.DataRateUnit == "bits" {diff --git a/fs/config.go b/fs/config.goindex 16968672c..54c25f520 100644--- a/fs/config.go+++ b/fs/config.go@@ -114,6 +114,7 @@ var (userAgent = StringP("user-agent", "", "rclone/"+Version, "Set the user-agent to a specified string. The default is rclone/ version")immutable = BoolP("immutable", "", false, "Do not modify files. Fail if existing files have been modified.")autoConfirm = BoolP("auto-confirm", "", false, "If enabled, do not request console confirmation.")+ statsFileNameLength = IntP("stats-file-name-length", "", 40, "Max file name length in stats. 0 for no limit")streamingUploadCutoff = SizeSuffix(100 * 1024)dump DumpFlagslogLevel = LogLevelNotice@@ -255,6 +256,7 @@ type ConfigInfo struct {Immutable boolAutoConfirm boolStreamingUploadCutoff SizeSuffix+ StatsFileNameLength int}// Return the path to the configuration file@@ -392,6 +394,7 @@ func LoadConfig() {Config.TPSLimitBurst = *tpsLimitBurstConfig.Immutable = *immutableConfig.AutoConfirm = *autoConfirm+ Config.StatsFileNameLength = *statsFileNameLengthConfig.BufferSize = bufferSizeConfig.StreamingUploadCutoff = streamingUploadCutoffConfig.Dump = dump