From 06766a57f6453604cbddbf6ca61012015d49693b Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Sat, 9 Apr 2016 08:32:01 -0700 Subject: [PATCH] ssh auth: Clean up --- Sparkles/SSHAuthenticationInfo.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Sparkles/SSHAuthenticationInfo.cs b/Sparkles/SSHAuthenticationInfo.cs index f6bb0ef2..11b999be 100644 --- a/Sparkles/SSHAuthenticationInfo.cs +++ b/Sparkles/SSHAuthenticationInfo.cs @@ -101,12 +101,11 @@ namespace Sparkles { "-C \"" + computer_name + " (SparkleShare)\" " + // Key comment "-f \"" + key_file_name + "\""; - var process = new Command ("ssh-keygen", arguments); - process.StartInfo.WorkingDirectory = Path; - process.Start (); - process.WaitForExit (); + var ssh_keygen = new Command ("ssh-keygen", arguments); + ssh_keygen.StartInfo.WorkingDirectory = Path; + ssh_keygen.StartAndWaitForExit (); - if (process.ExitCode == 0) { + if (ssh_keygen.ExitCode == 0) { Logger.LogInfo ("Auth", "Created key pair: " + key_file_name); ImportKeys ();