forked from TrueCloudLab/restic
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
1 changed files with 0 additions and 10 deletions
|
@ -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 a new issue