diff --git a/SparkleShare/SparkleDialog.cs b/SparkleShare/SparkleDialog.cs index 22684f82..461a189b 100644 --- a/SparkleShare/SparkleDialog.cs +++ b/SparkleShare/SparkleDialog.cs @@ -124,11 +124,13 @@ namespace SparkleShare { Process.StartInfo.WorkingDirectory = SparklePaths.SparkleTmpPath; - Process.StartInfo.Arguments = - "clone " + SparkleHelpers.CombineMore (RepoRemoteUrl, RepoName) - .Substring (2); + Process.StartInfo.Arguments = "clone "; + Process.StartInfo.Arguments += + SparkleHelpers.CombineMore (RepoRemoteUrl, RepoName).Substring (2); Process.Start (); + + // Move the folder to the SparkleShare folder when done cloning Process.Exited += delegate { Directory.Move ( SparkleHelpers.CombineMore (SparklePaths.SparkleTmpPath, @@ -137,10 +139,6 @@ namespace SparkleShare { RepoName) ); - // Enable notifications by default - File.Create ( - SparkleHelpers.CombineMore (SparklePaths.SparkleConfigPath, - "sparkleshare.notify")); Destroy (); }; diff --git a/SparkleShare/SparkleUI.cs b/SparkleShare/SparkleUI.cs index a6418ac8..1b734f73 100644 --- a/SparkleShare/SparkleUI.cs +++ b/SparkleShare/SparkleUI.cs @@ -138,6 +138,7 @@ namespace SparkleShare { // Create place to store configuration user's home folder string ConfigPath = SparklePaths.SparkleConfigPath; string AvatarPath = SparklePaths.SparkleAvatarPath; + if (!Directory.Exists (ConfigPath)) { Directory.CreateDirectory (ConfigPath); @@ -148,6 +149,15 @@ namespace SparkleShare { Console.WriteLine ("[Config] Created '" + AvatarPath + "avatars'"); } + + string NotifySettingFile = + SparkleHelpers.CombineMore (SparklePaths.SparkleConfigPath, + "sparkleshare.notify"); + + // Enable notifications by default + if (!File.Exists (NotifySettingFile)) + File.Create (NotifySettingFile); + }