Swift storageUrl overloading fixes #167
This commit is contained in:
parent
08a8f7174a
commit
c2e8f06bfa
3 changed files with 42 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue