controller: disable/enable main folder watcher during the right times

This commit is contained in:
Hylke Bons 2012-09-04 00:36:35 +01:00
parent 2c12befb10
commit 37f7aa8c18

View file

@ -552,14 +552,14 @@ namespace SparkleShare {
{
this.fetcher.EnableFetchedRepoCrypto (password);
this.watcher.EnableRaisingEvents = false;
FinishFetcher ();
this.watcher.EnableRaisingEvents = true;
}
public void FinishFetcher ()
{
this.watcher.EnableRaisingEvents = false;
this.fetcher.Complete ();
string canonical_name = Path.GetFileNameWithoutExtension (this.fetcher.RemoteUrl.AbsolutePath);
@ -609,6 +609,8 @@ namespace SparkleShare {
this.fetcher.Dispose ();
this.fetcher = null;
this.watcher.EnableRaisingEvents = true;
}