diff --git a/SparkleLib/Git/SparkleFetcherGit.cs b/SparkleLib/Git/SparkleFetcherGit.cs index fe8f85d6..50e50635 100755 --- a/SparkleLib/Git/SparkleFetcherGit.cs +++ b/SparkleLib/Git/SparkleFetcherGit.cs @@ -188,10 +188,16 @@ namespace SparkleLib.Git { this.git.Dispose (); } catch (Exception e) { - SparkleHelpers.DebugInfo ("Fetcher", "Failed to cancel properly: " + e.Message); + SparkleHelpers.DebugInfo ("Fetcher", "Failed to dispose properly: " + e.Message); } - Dispose (); + base.Dispose (); + } + + + new public void Dispose () + { + Stop (); } diff --git a/SparkleShare/SparkleControllerBase.cs b/SparkleShare/SparkleControllerBase.cs index d1593f69..07085c31 100644 --- a/SparkleShare/SparkleControllerBase.cs +++ b/SparkleShare/SparkleControllerBase.cs @@ -968,21 +968,22 @@ namespace SparkleShare { bool target_folder_exists = Directory.Exists ( Path.Combine (SparkleConfig.DefaultConfig.FoldersPath, canonical_name)); - // Add a numbered suffix to the name if a folder with the same name - // already exists. Example: "Folder (2)" - int i = 1; - while (target_folder_exists) { - i++; - target_folder_exists = Directory.Exists ( - Path.Combine (SparkleConfig.DefaultConfig.FoldersPath, canonical_name + " (" + i + ")")); - } - - string target_folder_name = canonical_name; - if (i > 1) - target_folder_name += " (" + i + ")"; this.fetcher.Finished += delegate (string [] warnings) { + // Add a numbered suffix to the name if a folder with the same name + // already exists. Example: "Folder (2)" + int i = 1; + while (target_folder_exists) { + i++; + target_folder_exists = Directory.Exists ( + Path.Combine (SparkleConfig.DefaultConfig.FoldersPath, canonical_name + " (" + i + ")")); + } + + string target_folder_name = canonical_name; + if (i > 1) + target_folder_name += " (" + i + ")"; + // Needed to do the moving SparkleHelpers.ClearAttributes (tmp_folder); string target_folder_path = Path.Combine (