cp: fix prefix handling in TypeC for object storage
This commit is contained in:
@@ -146,13 +146,10 @@ func checkCopySyntaxTypeC(srcURLs []string, tgtURL string) {
|
||||
|
||||
srcURL := srcURLs[0]
|
||||
srcURL = stripRecursiveURL(srcURL)
|
||||
_, srcContent, err := url2Stat(srcURL)
|
||||
_, _, err := url2Stat(srcURL)
|
||||
if err != nil && !prefixExists(srcURL) {
|
||||
fatalIf(err.Trace(srcURL), "Unable to stat source ‘"+srcURL+"’.")
|
||||
}
|
||||
if err == nil && srcContent.Type.IsRegular() { // Ellipses is supported only for folders.
|
||||
fatalIf(errInvalidArgument().Trace(), "Source ‘"+srcURL+"’ is not a folder.")
|
||||
}
|
||||
_, tgtContent, err := url2Stat(tgtURL)
|
||||
// Target exist?.
|
||||
if err == nil {
|
||||
|
||||
Reference in New Issue
Block a user