Copy should verify for only buckets
This commit is contained in:
@@ -81,8 +81,10 @@ func checkCopySyntax(ctx *cli.Context) {
|
||||
if url.Path == string(url.Separator) {
|
||||
fatalIf(errInvalidArgument().Trace(), fmt.Sprintf("Target ‘%s’ does not contain bucket name.", tgtURL))
|
||||
}
|
||||
if err := bucketExists(tgtURL); err != nil {
|
||||
fatalIf(err.Trace(), fmt.Sprintf("Unable to stat target ‘%s’.", tgtURL))
|
||||
if strings.Count(url.Path, "/") < 2 {
|
||||
if err := bucketExists(tgtURL); err != nil {
|
||||
fatalIf(err.Trace(), fmt.Sprintf("Unable to stat target ‘%s’.", tgtURL))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user