mirror of
https://github.com/minio/mc.git
synced 2025-11-10 13:42:32 +03:00
Remove isURLPrefixExists() call (#4173)
isURLPrefixExists() is used after url2Stat() function to check if the given aliased URL corresponds to an existing prefix in the server. However, url2Stat() is already doing that and returns valid information for those prefixes. Removing isURLPrefixExists() all together.
This commit is contained in:
@@ -183,15 +183,7 @@ func checkCopySyntaxTypeC(ctx context.Context, srcURLs []string, tgtURL string,
|
||||
|
||||
for _, srcURL := range srcURLs {
|
||||
c, srcContent, err := url2Stat(ctx, srcURL, "", false, keys, timeRef, isZip)
|
||||
// incomplete uploads are not necessary for copy operation, no need to verify for them.
|
||||
isIncomplete := false
|
||||
if err != nil {
|
||||
if !isURLPrefixExists(srcURL, isIncomplete) {
|
||||
fatalIf(err.Trace(srcURL), "Unable to stat source `"+srcURL+"`.")
|
||||
}
|
||||
// No more check here, continue to the next source url
|
||||
continue
|
||||
}
|
||||
fatalIf(err.Trace(srcURL), "Unable to stat source `"+srcURL+"`.")
|
||||
|
||||
if srcContent.Type.IsDir() {
|
||||
// Require --recursive flag if we are copying a directory
|
||||
|
||||
Reference in New Issue
Block a user