1
0
mirror of https://github.com/minio/mc.git synced 2025-11-10 13:42:32 +03:00

mirror: For non-s3 make sure we copy and exit properly. (#1995)

This commit is contained in:
Harshavardhana
2017-02-03 15:55:44 -08:00
committed by GitHub
parent 2ffa265d8c
commit cca8c10f33
6 changed files with 79 additions and 182 deletions

View File

@@ -49,11 +49,8 @@ func checkCopySyntax(ctx *cli.Context) {
// Check if bucket name is passed for URL type arguments.
url := newClientURL(tgtURL)
if url.Host != "" {
// This check is for type URL.
if !isURLVirtualHostStyle(url.Host) {
if url.Path == string(url.Separator) {
fatalIf(errInvalidArgument().Trace(), fmt.Sprintf("Target %s does not contain bucket name.", tgtURL))
}
if url.Path == string(url.Separator) {
fatalIf(errInvalidArgument().Trace(), fmt.Sprintf("Target %s does not contain bucket name.", tgtURL))
}
}