config: Remove commented out code
This commit is contained in:
parent
26ef2173bb
commit
9c64c3fb50
|
@ -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<string> Folders {
|
||||
get {
|
||||
|
|
Loading…
Reference in a new issue