From c377ee725deef1b6db9e02d95a0b6c094e4fb8f2 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Tue, 15 Jun 2010 00:36:12 +0100 Subject: [PATCH] SparkleDialog: move or delete depending on succes after cloning is done --- AUTHORS | 3 ++- SparkleShare/SparkleDialog.cs | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index e36eff3e..62c7cbda 100644 --- a/AUTHORS +++ b/AUTHORS @@ -11,4 +11,5 @@ Contributors: Łukasz Jernaś Sandy Armstrong Philipp Gildein - Oleg Khlystov + Oleg Khlystov + Simon Pither diff --git a/SparkleShare/SparkleDialog.cs b/SparkleShare/SparkleDialog.cs index 3b1f65ac..ede1f9cc 100644 --- a/SparkleShare/SparkleDialog.cs +++ b/SparkleShare/SparkleDialog.cs @@ -156,6 +156,8 @@ namespace SparkleShare { "Please double check the address and\n" + "network connection."); + Directory.Delete (SparkleHelpers.CombineMore (SparklePaths.SparkleTmpPath, RepoName)); + ErrorBubble.AddAction ("", _("Try Again…"), delegate { SparkleDialog SparkleDialog = new SparkleDialog (RepoRemoteUrl); @@ -168,6 +170,9 @@ namespace SparkleShare { SparkleHelpers.DebugInfo ("Git", "[" + RepoName + "] Repository cloned"); SparkleShare.SparkleUI.UpdateRepositories (); + Directory.Move (SparkleHelpers.CombineMore (SparklePaths.SparkleTmpPath, RepoName), + SparkleHelpers.CombineMore (SparklePaths.SparklePath, RepoName)); + // Show a confirmation notification SparkleBubble FinishedBubble; FinishedBubble = new SparkleBubble (String.Format(_("Successfully synced folder ‘{0}’"), RepoName),