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:
Olaoluwa Osuntokun 2018-08-16 17:15:12 -07:00 committed by GitHub
commit 4492cb934f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -334,7 +334,8 @@ func (u *UnlockerService) ChangePassword(ctx context.Context,
// this after unlocking the wallet to ensure macaroon files don't get
// deleted with incorrect password attempts.
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
}
}