controller: fix migration of key files. #closes #1184

This commit is contained in:
Hylke Bons 2013-02-12 19:52:45 +00:00
parent 9991cab4af
commit 3f0093759c

View file

@ -191,7 +191,7 @@ namespace SparkleShare {
// Replace spaces with underscores in old keys
if (file_name.Contains (" ")) {
string new_file_name = file_name.Replace (" ", "_");
File.Move (key_file_path, Path.Combine (keys_path));
File.Move (key_file_path, Path.Combine (keys_path, new_file_name));
File.Move (key_file_path + ".pub", Path.Combine (keys_path, new_file_name + ".pub"));
key_file_path = Path.Combine (keys_path, new_file_name);
}