fetcher git: also dispose git process on dispose
This commit is contained in:
parent
145e8fe01d
commit
1dd617648a
|
@ -188,10 +188,16 @@ namespace SparkleLib.Git {
|
||||||
this.git.Dispose ();
|
this.git.Dispose ();
|
||||||
|
|
||||||
} catch (Exception e) {
|
} 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 ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -968,6 +968,9 @@ namespace SparkleShare {
|
||||||
bool target_folder_exists = Directory.Exists (
|
bool target_folder_exists = Directory.Exists (
|
||||||
Path.Combine (SparkleConfig.DefaultConfig.FoldersPath, canonical_name));
|
Path.Combine (SparkleConfig.DefaultConfig.FoldersPath, canonical_name));
|
||||||
|
|
||||||
|
|
||||||
|
this.fetcher.Finished += delegate (string [] warnings) {
|
||||||
|
|
||||||
// Add a numbered suffix to the name if a folder with the same name
|
// Add a numbered suffix to the name if a folder with the same name
|
||||||
// already exists. Example: "Folder (2)"
|
// already exists. Example: "Folder (2)"
|
||||||
int i = 1;
|
int i = 1;
|
||||||
|
@ -981,8 +984,6 @@ namespace SparkleShare {
|
||||||
if (i > 1)
|
if (i > 1)
|
||||||
target_folder_name += " (" + i + ")";
|
target_folder_name += " (" + i + ")";
|
||||||
|
|
||||||
this.fetcher.Finished += delegate (string [] warnings) {
|
|
||||||
|
|
||||||
// Needed to do the moving
|
// Needed to do the moving
|
||||||
SparkleHelpers.ClearAttributes (tmp_folder);
|
SparkleHelpers.ClearAttributes (tmp_folder);
|
||||||
string target_folder_path = Path.Combine (
|
string target_folder_path = Path.Combine (
|
||||||
|
|
Loading…
Reference in a new issue