link code is no longer needed in the user's sync folder
This commit is contained in:
parent
e35e46f0d0
commit
db7066a0a2
|
@ -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 ();
|
||||
}
|
||||
|
||||
|
@ -261,11 +243,7 @@ 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 ();
|
||||
|
||||
|
|
Loading…
Reference in a new issue