Merge pull request #15273 from calavera/remove_new_key_path_on_error

Remove key file when migration fails.
This commit is contained in:
David Calavera 2015-08-03 16:07:22 -07:00
commit 40bd10dc95
1 changed files with 1 additions and 0 deletions

View File

@ -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)
}
}()