Merge pull request #1732 from wpaulino/no-macaroons-change-password
walletunlocker: avoid returning error if macaroon files don't exist
This commit is contained in:
1 file changed
+2
-1
@@ -334,7 +334,8 @@ func (u *UnlockerService) ChangePassword(ctx context.Context,
|
|||||||
// this after unlocking the wallet to ensure macaroon files don't get
|
// this after unlocking the wallet to ensure macaroon files don't get
|
||||||
// deleted with incorrect password attempts.
|
// deleted with incorrect password attempts.
|
||||||
for _, file := range u.macaroonFiles {
|
for _, file := range u.macaroonFiles {
|
||||||
if err := os.Remove(file); err != nil {
|
err := os.Remove(file)
|
||||||
|
if err != nil && !os.IsNotExist(err) {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user