mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-12 01:41:36 +00:00
accounts/scwallet: truncate before write
This commit is contained in:
parent
6ece4cd143
commit
dc7881b9d2
1 changed files with 3 additions and 0 deletions
|
|
@ -129,6 +129,9 @@ func (hub *Hub) writePairings() error {
|
|||
return err
|
||||
}
|
||||
|
||||
if err := pairingFile.Truncate(0); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := pairingFile.Write(pairingData); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue