Do not attempt Stat() for destination fixes copy to objectstorage bug
This commit is contained in:
@@ -100,13 +100,6 @@ func (manager mcClientManager) getTargetWriter(targetURL string, targetConfig *h
|
||||
if err != nil {
|
||||
return nil, iodine.New(err, nil)
|
||||
}
|
||||
// check if the bucket is valid
|
||||
// For object storage URL's do a StatBucket(), not necessary for fs client
|
||||
if client.GetType(targetURL) != client.Filesystem {
|
||||
if _, err := targetClnt.Stat(); err != nil {
|
||||
return nil, iodine.New(err, map[string]string{"failedURL": targetURL})
|
||||
}
|
||||
}
|
||||
return targetClnt.Put(md5Hex, length)
|
||||
}
|
||||
|
||||
|
||||
@@ -246,7 +246,6 @@ func (c *s3Client) getObjectMetadata(bucket, object string) (item *client.Item,
|
||||
// Stat - send a 'HEAD' on a bucket or object to see if exists
|
||||
func (c *s3Client) Stat() (*client.Item, error) {
|
||||
bucket, object := c.url2BucketAndObject()
|
||||
fmt.Println(bucket, object)
|
||||
if object == "" {
|
||||
return c.getBucketMetadata(bucket)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user