make home dir fetching less platform dependant
This commit is contained in:
parent
80bbffa205
commit
6acced712e
|
@ -140,6 +140,8 @@ namespace SparkleShare {
|
||||||
Process.StartInfo.RedirectStandardOutput = true;
|
Process.StartInfo.RedirectStandardOutput = true;
|
||||||
Process.StartInfo.UseShellExecute = false;
|
Process.StartInfo.UseShellExecute = false;
|
||||||
|
|
||||||
|
Console.WriteLine ("[Git][" + RepoName + "] Cloning repository...");
|
||||||
|
|
||||||
// Clone into the system's temporary folder
|
// Clone into the system's temporary folder
|
||||||
Process.StartInfo.FileName = "git";
|
Process.StartInfo.FileName = "git";
|
||||||
Process.StartInfo.WorkingDirectory = SparklePaths.SparkleTmpPath;
|
Process.StartInfo.WorkingDirectory = SparklePaths.SparkleTmpPath;
|
||||||
|
@ -150,7 +152,6 @@ namespace SparkleShare {
|
||||||
Process.Start ();
|
Process.Start ();
|
||||||
string Output = Process.StandardOutput.ReadToEnd ();
|
string Output = Process.StandardOutput.ReadToEnd ();
|
||||||
|
|
||||||
Console.WriteLine ("[Git][" + RepoName + "] Cloning repository...");
|
|
||||||
|
|
||||||
// Move the folder to the SparkleShare folder when done cloning
|
// Move the folder to the SparkleShare folder when done cloning
|
||||||
Process.Exited += delegate {
|
Process.Exited += delegate {
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
using Mono.Unix;
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
||||||
|
@ -23,8 +24,9 @@ namespace SparkleShare {
|
||||||
|
|
||||||
public static string SparkleTmpPath = "/tmp/sparkleshare";
|
public static string SparkleTmpPath = "/tmp/sparkleshare";
|
||||||
|
|
||||||
public static string HomePath =
|
private static UnixUserInfo UnixUserInfo =
|
||||||
Environment.GetEnvironmentVariable ("HOME");
|
new UnixUserInfo (UnixEnvironment.UserName);
|
||||||
|
public static string HomePath = UnixUserInfo.HomeDirectory;
|
||||||
|
|
||||||
public static string SparklePath = Path.Combine (HomePath ,"SparkleShare");
|
public static string SparklePath = Path.Combine (HomePath ,"SparkleShare");
|
||||||
|
|
||||||
|
|
|
@ -191,6 +191,7 @@ namespace SparkleShare {
|
||||||
// Stages the made changes
|
// Stages the made changes
|
||||||
public void Add () {
|
public void Add () {
|
||||||
BufferTimer.Stop ();
|
BufferTimer.Stop ();
|
||||||
|
FetchTimer.Stop ();
|
||||||
Console.WriteLine ("[Git][" + Name + "] Staging changes...");
|
Console.WriteLine ("[Git][" + Name + "] Staging changes...");
|
||||||
Process.StartInfo.Arguments = "add --all";
|
Process.StartInfo.Arguments = "add --all";
|
||||||
Process.Start ();
|
Process.Start ();
|
||||||
|
@ -198,6 +199,7 @@ namespace SparkleShare {
|
||||||
Console.WriteLine ("[Git][" + Name + "] Changes staged.");
|
Console.WriteLine ("[Git][" + Name + "] Changes staged.");
|
||||||
// SparkleUI.NotificationIcon.SetSyncingState ();
|
// SparkleUI.NotificationIcon.SetSyncingState ();
|
||||||
// SparkleUI.NotificationIcon.SetIdleState ();
|
// SparkleUI.NotificationIcon.SetIdleState ();
|
||||||
|
FetchTimer.Start ();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Commits the made changes
|
// Commits the made changes
|
||||||
|
|
Loading…
Reference in a new issue