empty PGP keys will make app crash at startup
This commit is contained in:
Bob Sun 2017-02-23 20:30:58 +08:00
parent 3359982f69
commit 2372466883
No known key found for this signature in database
GPG key ID: 1F86BA2052FED3B4

View file

@ -131,7 +131,7 @@ class PasswordStore {
} catch {
print(error)
}
if Defaults[.pgpKeyID] != "" {
if Defaults[.pgpKeyID] != nil {
pgp.importKeys(fromFile: Globals.pgpPublicKeyPath, allowDuplicates: false)
pgp.importKeys(fromFile: Globals.pgpPrivateKeyPath, allowDuplicates: false)