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