b2: remove duplicate check for config file during repository creation

No other backend implements that check. The check that a repository is
not yet initialized is handled by the Repository later on.
This commit is contained in:
Michael Eischer 2023-06-08 16:21:59 +02:00
parent 3a3cf608f5
commit 3d3bb88745

View file

@ -147,16 +147,6 @@ func Create(ctx context.Context, cfg Config, rt http.RoundTripper) (restic.Backe
}, },
listMaxItems: defaultListMaxItems, listMaxItems: defaultListMaxItems,
} }
_, err = be.Stat(ctx, restic.Handle{Type: restic.ConfigFile})
if err != nil && !be.IsNotExist(err) {
return nil, err
}
if err == nil {
return nil, errors.New("config already exists")
}
return be, nil return be, nil
} }