2
2
mirror of https://github.com/octoleo/restic.git synced 2024-12-22 10:58:55 +00:00

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
} }