Merge pull request #1448 from harshavardhana/type-a-cp

cp: In TypeA no need to verify target
This commit is contained in:
Harshavardhana
2015-11-19 13:28:32 -08:00
-8
View File
@@ -76,14 +76,6 @@ func checkCopySyntaxTypeA(srcURLs []string, tgtURL string) {
if !srcContent.Type.IsRegular() {
fatalIf(errInvalidArgument().Trace(), "Source ‘"+srcURL+"’ is not a file.")
}
// Check target.
_, tgtContent, err := url2Stat(tgtURL)
fatalIf(err.Trace(srcURL), "Unable to stat target ‘"+tgtURL+"’.")
if !tgtContent.Type.IsRegular() {
fatalIf(errInvalidArgument().Trace(), "Target ‘"+tgtURL+"’ is not a file.")
}
}
// checkCopySyntaxTypeB verifies if the source is a valid file and target is a valid dir.