1
0
mirror of https://github.com/minio/mc.git synced 2025-11-13 12:22:45 +03:00

config bug fixes and removed default-host support

This commit is contained in:
Anand Babu (AB) Periasamy
2015-04-09 02:39:33 -07:00
parent 0850aedd0c
commit 99240bfb2d
5 changed files with 99 additions and 56 deletions

View File

@@ -154,19 +154,8 @@ func url2Bucket(urlStr string) (bucketName string, err error) {
// parseURL extracts URL string from a single cmd-line argument
func parseURL(arg string) (urlStr string, err error) {
urlStr = arg
// Use default host if no argument is passed
if urlStr == "" {
// Load config file
config, err := getMcConfig()
if err != nil {
return "", iodine.New(err, nil)
}
urlStr = config.DefaultHost
}
// Check and expand Alias
urlStr, err = aliasExpand(urlStr)
urlStr, err = aliasExpand(arg)
if err != nil {
return "", iodine.New(err, nil)
}