From aa3eacecf25d2baf64e2ab0e6755102cecf3291e Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Mon, 16 Nov 2015 17:37:03 -0800 Subject: [PATCH] cp: fix prefix handling in TypeC for object storage --- cp-url.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cp-url.go b/cp-url.go index a2774dbc..f3610e0d 100644 --- a/cp-url.go +++ b/cp-url.go @@ -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 {