fix portability issue in OnFileActivity
This commit is contained in:
parent
5501a448b5
commit
b60a21731a
|
@ -299,7 +299,7 @@ namespace SparkleLib {
|
||||||
// Starts a timer when something changes
|
// Starts a timer when something changes
|
||||||
public void OnFileActivity (object o, FileSystemEventArgs args)
|
public void OnFileActivity (object o, FileSystemEventArgs args)
|
||||||
{
|
{
|
||||||
if (args.FullPath.Contains ("/."))
|
if (args.FullPath.Contains (Path.DirectorySeparatorChar + "."))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
WatcherChangeTypes wct = args.ChangeType;
|
WatcherChangeTypes wct = args.ChangeType;
|
||||||
|
|
|
@ -46,10 +46,11 @@ namespace SparkleShare {
|
||||||
+ System.Environment.ExpandEnvironmentVariables ("%PATH%");
|
+ System.Environment.ExpandEnvironmentVariables ("%PATH%");
|
||||||
System.Environment.SetEnvironmentVariable ("PATH", newPath);
|
System.Environment.SetEnvironmentVariable ("PATH", newPath);
|
||||||
System.Environment.SetEnvironmentVariable ("PLINK_PROTOCOL", "ssh");
|
System.Environment.SetEnvironmentVariable ("PLINK_PROTOCOL", "ssh");
|
||||||
|
|
||||||
|
if (String.IsNullOrEmpty (System.Environment.GetEnvironmentVariable ("HOME")))
|
||||||
System.Environment.SetEnvironmentVariable ("HOME", Environment.ExpandEnvironmentVariables ("%HOMEDRIVE%%HOMEPATH%"));
|
System.Environment.SetEnvironmentVariable ("HOME", Environment.ExpandEnvironmentVariables ("%HOMEDRIVE%%HOMEPATH%"));
|
||||||
|
|
||||||
StartSshAgent ();
|
StartSshAgent ();
|
||||||
AddDefaultKey ();
|
|
||||||
|
|
||||||
base.Initialize ();
|
base.Initialize ();
|
||||||
}
|
}
|
||||||
|
@ -103,17 +104,6 @@ namespace SparkleShare {
|
||||||
process.Start();
|
process.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddDefaultKey ()
|
|
||||||
{
|
|
||||||
/*Process process = new Process ();
|
|
||||||
process.StartInfo.RedirectStandardOutput = true;
|
|
||||||
process.StartInfo.UseShellExecute = false;
|
|
||||||
process.StartInfo.FileName = "ssh-add";
|
|
||||||
process.StartInfo.Arguments = @"~/.ssh/id_rsa";
|
|
||||||
process.Start ();
|
|
||||||
process.WaitForExit ();*/
|
|
||||||
}
|
|
||||||
|
|
||||||
private void StartSshAgent ()
|
private void StartSshAgent ()
|
||||||
{
|
{
|
||||||
if (String.IsNullOrEmpty (System.Environment.GetEnvironmentVariable ("SSH_AUTH_SOCK"))) {
|
if (String.IsNullOrEmpty (System.Environment.GetEnvironmentVariable ("SSH_AUTH_SOCK"))) {
|
||||||
|
|
Loading…
Reference in a new issue