mirror of
https://github.com/restic/restic.git
synced 2025-11-15 11:04:12 +00:00
init: pass proper context to master key generation
This is no change in behavior as a canceled context did later on cause the config file creation to fail. Therefore this change just lets the repository initialization fail a bit earlier.
This commit is contained in:
@@ -638,7 +638,7 @@ func (r *Repository) Init(ctx context.Context, password string, chunkerPolynomia
|
||||
// init creates a new master key with the supplied password and uses it to save
|
||||
// the config into the repo.
|
||||
func (r *Repository) init(ctx context.Context, password string, cfg restic.Config) error {
|
||||
key, err := createMasterKey(r, password)
|
||||
key, err := createMasterKey(ctx, r, password)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user