diff --git a/SparkleShare/SparkleControllerBase.cs b/SparkleShare/SparkleControllerBase.cs index 7232920e..2d1b3bf9 100644 --- a/SparkleShare/SparkleControllerBase.cs +++ b/SparkleShare/SparkleControllerBase.cs @@ -205,25 +205,7 @@ namespace SparkleShare { } } - if (!string.IsNullOrEmpty (key_file_path)) { - string public_key_file_path = key_file_path + ".pub"; - string name = Program.Controller.CurrentUser.Name.Split (" ".ToCharArray ()) [0]; - - if (name.EndsWith ("s")) - name += "'"; - else - name += "'s"; - - string link_code_file_path = Path.Combine (FoldersPath, name + " link code.txt"); - - // Create an easily accessible copy of the public - // key in the user's SparkleShare folder - if (File.Exists (public_key_file_path) && !File.Exists (link_code_file_path)) - File.Copy (public_key_file_path, link_code_file_path, true); - - CurrentUser.PublicKey = File.ReadAllText (public_key_file_path); - } - + CurrentUser.PublicKey = File.ReadAllText (key_file_path + ".pub"); SparkleKeys.ListPrivateKeys (); } @@ -260,12 +242,8 @@ namespace SparkleShare { string [] key_pair = SparkleKeys.GenerateKeyPair (keys_path, key_file_name); SparkleKeys.ImportPrivateKey (key_pair [0]); - - string link_code_file_path = Path.Combine (Program.Controller.FoldersPath, "Your link code.txt"); - - // Create an easily accessible copy of the public - // key in the user's SparkleShare folder - File.Copy (key_pair [1], link_code_file_path, true); + + CurrentUser.PublicKey = File.ReadAllText (key_pair [1]); }).Start ();