Merge pull request #685 from jannic/patch-1

Update debug message
This commit is contained in:
Alexander Neumann 2016-12-06 08:16:33 +01:00 committed by GitHub
commit 0fceeb20f1

View file

@ -37,13 +37,13 @@ func Open(cfg Config) (restic.Backend, error) {
be := &s3{client: client, bucketname: cfg.Bucket, prefix: cfg.Prefix}
be.createConnections()
ok, err := client.BucketExists(cfg.Bucket)
found, err := client.BucketExists(cfg.Bucket)
if err != nil {
debug.Log("BucketExists(%v) returned err %v, trying to create the bucket", cfg.Bucket, err)
debug.Log("BucketExists(%v) returned err %v", cfg.Bucket, err)
return nil, errors.Wrap(err, "client.BucketExists")
}
if !ok {
if !found {
// create new bucket with default ACL in default region
err = client.MakeBucket(cfg.Bucket, "")
if err != nil {