SparkleDialog: move or delete depending on succes after cloning is done

This commit is contained in:
Hylke Bons 2010-06-15 00:36:12 +01:00
parent 57f02b92d2
commit c377ee725d
2 changed files with 7 additions and 1 deletions

View file

@ -11,4 +11,5 @@ Contributors:
Łukasz Jernaś <deejay1@srem.org>
Sandy Armstrong <sanfordarmstrong@gmail.com>
Philipp Gildein <rmbl@openspeak-project.org>
Oleg Khlystov <pktfag@gmail.com>
Oleg Khlystov <pktfag@gmail.com>
Simon Pither <simon@pither.com>

View file

@ -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),