2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-02 11:46:36 +00:00

evaluate open error

This commit is contained in:
Bruno Clermont 2017-07-17 11:33:19 +03:00
parent 41b624ea1b
commit 00b9a1d87d

View File

@ -92,6 +92,9 @@ func Open(cfg Config) (restic.Backend, error) {
// it does not exist yet.
func Create(cfg Config) (restic.Backend, error) {
be, err := open(cfg)
if err != nil {
return nil, errors.Wrap(err, "open")
}
found, err := be.client.BucketExists(cfg.Bucket)
if err != nil {
debug.Log("BucketExists(%v) returned err %v", cfg.Bucket, err)