mirror of
https://github.com/octoleo/restic.git
synced 2024-12-22 19:08: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:
parent
3a3cf608f5
commit
3d3bb88745
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user