Do not attempt Stat() for destination fixes copy to objectstorage bug

This commit is contained in:
Harshavardhana
2015-04-24 14:02:29 -07:00
parent a3d46f5930
commit b4c70f1a95
2 changed files with 0 additions and 8 deletions
-7
View File
@@ -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)
}
-1
View File
@@ -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)
}