"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: fix the defaults overriding the actual config
Nick Craig-Wood91558ce6aaca
diff --git a/fs/configmap.go b/fs/configmap.goindex 4155f830d..6f5ba5d52 100644--- a/fs/configmap.go+++ b/fs/configmap.go@@ -64,7 +64,7 @@ type regInfoValues struct {// the default valuesfunc (r *regInfoValues) Get(key string) (value string, ok bool) {opt := r.options.Get(key)- if opt != nil && (r.useDefault || opt.Value != nil) {+ if opt != nil && (r.useDefault || !opt.IsDefault()) {return opt.String(), true}return "", falsediff --git a/fs/registry.go b/fs/registry.goindex 2c46194cb..d0799331f 100644--- a/fs/registry.go+++ b/fs/registry.go@@ -244,6 +244,18 @@ func (o *Option) GetValue() interface{} {return val}+// IsDefault returns true if the value is the default value+func (o *Option) IsDefault() bool {+ if o.Value == nil {+ return true+ }+ Default := o.Default+ if Default == nil {+ Default = ""+ }+ return reflect.DeepEqual(o.Value, Default)+}+// String turns Option into a stringfunc (o *Option) String() string {v := o.GetValue()