mirror of
https://github.com/octoleo/restic.git
synced 2024-12-23 03:18:55 +00:00
Merge pull request #1107 from bclermont/fix-s3-panic
Fix S3 panic on Invalid configuration
This commit is contained in:
commit
f45abac27f
@ -92,6 +92,9 @@ func Open(cfg Config) (restic.Backend, error) {
|
|||||||
// it does not exist yet.
|
// it does not exist yet.
|
||||||
func Create(cfg Config) (restic.Backend, error) {
|
func Create(cfg Config) (restic.Backend, error) {
|
||||||
be, err := open(cfg)
|
be, err := open(cfg)
|
||||||
|
if err != nil {
|
||||||
|
return nil, errors.Wrap(err, "open")
|
||||||
|
}
|
||||||
found, err := be.client.BucketExists(cfg.Bucket)
|
found, err := be.client.BucketExists(cfg.Bucket)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
debug.Log("BucketExists(%v) returned err %v", cfg.Bucket, err)
|
debug.Log("BucketExists(%v) returned err %v", cfg.Bucket, err)
|
||||||
|
Loading…
Reference in New Issue
Block a user