Merge pull request #267 from SimplyDanny/fix-258
Fix #258: Remove keys before moving new ones
This commit is contained in:
commit
b154c04178
1 changed files with 7 additions and 0 deletions
|
|
@ -838,10 +838,17 @@ public class PasswordStore {
|
|||
}
|
||||
|
||||
public func gitSSHKeyImportFromFileSharing() throws {
|
||||
if gitSSHKeyExists() {
|
||||
try fm.removeItem(atPath: Globals.gitSSHPrivateKeyPath)
|
||||
}
|
||||
try fm.moveItem(atPath: Globals.iTunesFileSharingSSHPrivate, toPath: Globals.gitSSHPrivateKeyPath)
|
||||
}
|
||||
|
||||
public func pgpKeyImportFromFileSharing() throws {
|
||||
if pgpKeyExists() {
|
||||
try fm.removeItem(atPath: Globals.pgpPublicKeyPath)
|
||||
try fm.removeItem(atPath: Globals.pgpPrivateKeyPath)
|
||||
}
|
||||
try fm.moveItem(atPath: Globals.iTunesFileSharingPGPPublic, toPath: Globals.pgpPublicKeyPath)
|
||||
try fm.moveItem(atPath: Globals.iTunesFileSharingPGPPrivate, toPath: Globals.pgpPrivateKeyPath)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue