"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
swift: make it so just storage_url or auth_token can be overidden
Nick Craig-Wood842ed7d2a9a4
diff --git a/backend/swift/swift.go b/backend/swift/swift.goindex 681dc8858..65856a327 100644--- a/backend/swift/swift.go+++ b/backend/swift/swift.go@@ -277,6 +277,15 @@ func swiftConnection(opt *Options, name string) (*swift.Connection, error) {// provided by wrapping the existing auth, so we can just// override one or the other or both.if StorageUrl != "" || AuthToken != "" {+ // Re-write StorageURL and AuthToken if they are being+ // overridden as c.Authenticate above will have+ // overwritten them.+ if StorageUrl != "" {+ c.StorageUrl = StorageUrl+ }+ if AuthToken != "" {+ c.AuthToken = AuthToken+ }c.Auth = newAuth(c.Auth, StorageUrl, AuthToken)}return c, nil