Detect the correct .shh path on Windows
This commit is contained in:
parent
3cde6d5b2b
commit
9df0fd6440
|
@ -113,9 +113,15 @@ namespace SparkleLib {
|
||||||
|
|
||||||
private void DisableHostKeyCheckingForHost (string host)
|
private void DisableHostKeyCheckingForHost (string host)
|
||||||
{
|
{
|
||||||
string ssh_config_file_path = SparkleHelpers.CombineMore (
|
string path = SparklePaths.HomePath;
|
||||||
SparklePaths.HomePath, ".ssh", "config");
|
|
||||||
|
|
||||||
|
if (!(SparkleBackend.Platform == PlatformID.Unix ||
|
||||||
|
SparkleBackend.Platform == PlatformID.MacOSX)) {
|
||||||
|
|
||||||
|
path = Environment.ExpandEnvironmentVariables ("%HOMEDRIVE%%HOMEPATH%");
|
||||||
|
}
|
||||||
|
|
||||||
|
string ssh_config_file_path = SparkleHelpers.CombineMore (path, ".ssh", "config");
|
||||||
string ssh_config = Environment.NewLine + "Host " + host +
|
string ssh_config = Environment.NewLine + "Host " + host +
|
||||||
Environment.NewLine + "\tStrictHostKeyChecking no";
|
Environment.NewLine + "\tStrictHostKeyChecking no";
|
||||||
|
|
||||||
|
@ -140,9 +146,15 @@ namespace SparkleLib {
|
||||||
|
|
||||||
private void EnableHostKeyCheckingForHost (string host)
|
private void EnableHostKeyCheckingForHost (string host)
|
||||||
{
|
{
|
||||||
string ssh_config_file_path = SparkleHelpers.CombineMore (
|
string path = SparklePaths.HomePath;
|
||||||
SparklePaths.HomePath, ".ssh", "config");
|
|
||||||
|
|
||||||
|
if (!(SparkleBackend.Platform == PlatformID.Unix ||
|
||||||
|
SparkleBackend.Platform == PlatformID.MacOSX)) {
|
||||||
|
|
||||||
|
path = Environment.ExpandEnvironmentVariables ("%HOMEDRIVE%%HOMEPATH%");
|
||||||
|
}
|
||||||
|
|
||||||
|
string ssh_config_file_path = SparkleHelpers.CombineMore (path, ".ssh", "config");
|
||||||
string ssh_config = Environment.NewLine + "Host " + host +
|
string ssh_config = Environment.NewLine + "Host " + host +
|
||||||
Environment.NewLine + "\tStrictHostKeyChecking no";
|
Environment.NewLine + "\tStrictHostKeyChecking no";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue