don't hardcode home dir
This commit is contained in:
parent
ceddc34033
commit
f0a499f31e
|
@ -100,10 +100,8 @@ public class SparklePonyUI {
|
||||||
Process.StartInfo.UseShellExecute = false;
|
Process.StartInfo.UseShellExecute = false;
|
||||||
|
|
||||||
// Get home folder, example: "/home/user"
|
// Get home folder, example: "/home/user"
|
||||||
Process.StartInfo.FileName = "whoami";
|
UserHome = Environment.GetEnvironmentVariable("HOME");
|
||||||
Process.StartInfo.Arguments = "";
|
Console.WriteLine (UserHome);
|
||||||
Process.Start();
|
|
||||||
UserHome = "/home/" + Process.StandardOutput.ReadToEnd().Trim () + "/";
|
|
||||||
|
|
||||||
// Create 'Collaboration' folder in the user's home folder
|
// Create 'Collaboration' folder in the user's home folder
|
||||||
FoldersPath = UserHome + "/Collaboration";
|
FoldersPath = UserHome + "/Collaboration";
|
||||||
|
@ -539,7 +537,7 @@ public class SparklePonyWindow : Window {
|
||||||
Process.StartInfo.RedirectStandardOutput = true;
|
Process.StartInfo.RedirectStandardOutput = true;
|
||||||
Process.StartInfo.UseShellExecute = false;
|
Process.StartInfo.UseShellExecute = false;
|
||||||
// TODO: fix hard coding, system independant
|
// TODO: fix hard coding, system independant
|
||||||
Process.StartInfo.WorkingDirectory = "/home/hbons/Collaboration/Deal";
|
Process.StartInfo.WorkingDirectory = Environment.GetEnvironmentVariable("HOME") + "/Collaboration/Deal";
|
||||||
Process.StartInfo.FileName = "git";
|
Process.StartInfo.FileName = "git";
|
||||||
Process.StartInfo.Arguments = "log --pretty=oneline -20";
|
Process.StartInfo.Arguments = "log --pretty=oneline -20";
|
||||||
Process.Start();
|
Process.Start();
|
||||||
|
|
Loading…
Reference in a new issue