Remove key file when migration fails.
Signed-off-by: David Calavera <david.calavera@gmail.com>
This commit is contained in:
parent
e84a938f2e
commit
07c45e499d
1 changed files with 1 additions and 0 deletions
|
@ -100,6 +100,7 @@ func migrateKey() (err error) {
|
|||
err = os.Remove(oldPath)
|
||||
} else {
|
||||
logrus.Warnf("Key migration failed, key file not removed at %s", oldPath)
|
||||
os.Remove(newPath)
|
||||
}
|
||||
}()
|
||||
|
||||
|
|
Loading…
Reference in a new issue