1
0
mirror of https://github.com/gilbertchen/duplicacy synced 2025-12-24 04:04:18 +00:00

Merge branch 'master' into master

This commit is contained in:
gilbertchen
2018-03-19 11:53:11 -04:00
committed by GitHub
14 changed files with 444 additions and 84 deletions

View File

@@ -596,6 +596,16 @@ func CreateStorage(preference Preference, resetPassword bool, threads int) (stor
}
SavePassword(preference, "hubic_token", tokenFile)
return hubicStorage
} else if matched[1] == "swift" {
prompt := fmt.Sprintf("Enter the OpenStack Swift key:")
key := GetPassword(preference, "swift_key", prompt, true, resetPassword)
swiftStorage, err := CreateSwiftStorage(storageURL[8:], key, threads)
if err != nil {
LOG_ERROR("STORAGE_CREATE", "Failed to load the OpenStack Swift storage at %s: %v", storageURL, err)
return nil
}
SavePassword(preference, "swift_key", key)
return swiftStorage
} else {
LOG_ERROR("STORAGE_CREATE", "The storage type '%s' is not supported", matched[1])
return nil