1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

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

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