From 9c64c3fb50704d8709a9f6f6c9244d71afbc84e5 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Wed, 11 Apr 2012 12:03:34 +0200 Subject: [PATCH] config: Remove commented out code --- SparkleLib/SparkleConfig.cs | 53 ------------------------------------- 1 file changed, 53 deletions(-) diff --git a/SparkleLib/SparkleConfig.cs b/SparkleLib/SparkleConfig.cs index de74dce9..b45bae43 100755 --- a/SparkleLib/SparkleConfig.cs +++ b/SparkleLib/SparkleConfig.cs @@ -209,59 +209,6 @@ namespace SparkleLib { } } -/* - private void ConfigureSSH () - { - if (User.Email.Equals ("Unknown")) - return; - - string path = Environment.GetFolderPath (Environment.SpecialFolder.Personal); - - if (!(SparkleBackend.Platform == PlatformID.Unix || - SparkleBackend.Platform == PlatformID.MacOSX)) { - - path = Environment.ExpandEnvironmentVariables ("%HOMEDRIVE%%HOMEPATH%"); - } - - string ssh_config_path = Path.Combine (path, ".ssh"); - string ssh_config_file_path = SparkleHelpers.CombineMore (path, ".ssh", "config"); - - string ssh_key_path = SparkleHelpers.NormalizeSeparatorsToOS( - Path.Combine(SparkleConfig.ConfigPath, "sparkleshare." + User.Email + ".key")); - if (SparkleHelpers.IsWindows && ssh_key_path.IndexOf(' ') >= 0) - { - ssh_key_path = "\"" + ssh_key_path + "\""; - } - string ssh_config = "IdentityFile " + ssh_key_path; - - if (!Directory.Exists (ssh_config_path)) - Directory.CreateDirectory (ssh_config_path); - - if (File.Exists (ssh_config_file_path)) { - string current_config = File.ReadAllText (ssh_config_file_path); - if (current_config.Contains (ssh_config)) - return; - - if (current_config.EndsWith ("\n\n")) - ssh_config = "# SparkleShare's key\n" + ssh_config; - else if (current_config.EndsWith ("\n")) - ssh_config = "\n# SparkleShare's key\n" + ssh_config; - else - ssh_config = "\n\n# SparkleShare's key\n" + ssh_config; - - TextWriter writer = File.AppendText (ssh_config_file_path); - writer.Write (ssh_config + "\n"); - writer.Close (); - - } else { - File.WriteAllText (ssh_config_file_path, ssh_config); - } - - Chmod644 (ssh_config_file_path); - - SparkleHelpers.DebugInfo ("Config", "Added key to " + ssh_config_file_path); - } -*/ public List Folders { get {