mirror of
https://github.com/rclone/rclone.git
synced 2025-06-25 14:22:55 +02:00
Swift storageUrl overloading fixes #167
This commit is contained in:
committed by
Nick Craig-Wood
parent
08a8f7174a
commit
c2e8f06bfa
@ -66,6 +66,9 @@ func init() {
|
||||
}, {
|
||||
Name: "region",
|
||||
Help: "Region name - optional",
|
||||
}, {
|
||||
Name: "storage_url",
|
||||
Help: "Storage URL - optional",
|
||||
},
|
||||
},
|
||||
})
|
||||
@ -176,6 +179,12 @@ func NewFsWithConnection(name, root string, c *swift.Connection) (fs.Fs, error)
|
||||
segmentsContainer: container + "_segments",
|
||||
root: directory,
|
||||
}
|
||||
// StorageURL overloading
|
||||
storageURL := fs.ConfigFile.MustValue(name, "storage_url")
|
||||
if storageURL != "" {
|
||||
f.c.StorageUrl = storageURL
|
||||
f.c.Auth = newAuth(f.c.Auth, storageURL)
|
||||
}
|
||||
if f.root != "" {
|
||||
f.root += "/"
|
||||
// Check to see if the object exists - ignoring directory markers
|
||||
|
Reference in New Issue
Block a user