From 593d327660f04403e12b052de7db36187290865c Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Tue, 14 Jun 2011 14:25:04 +0100 Subject: [PATCH] repo base: disable watching by using the existing method instead --- SparkleLib/SparkleRepoBase.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/SparkleLib/SparkleRepoBase.cs b/SparkleLib/SparkleRepoBase.cs index a61c8cc4..bd23459e 100644 --- a/SparkleLib/SparkleRepoBase.cs +++ b/SparkleLib/SparkleRepoBase.cs @@ -333,7 +333,7 @@ namespace SparkleLib { private void SyncUpBase () { try { - this.local_timer.Stop (); + DisableWatching (); this.remote_timer.Stop (); SparkleHelpers.DebugInfo ("SyncUp", "[" + Name + "] Initiated"); @@ -373,7 +373,7 @@ namespace SparkleLib { } finally { this.remote_timer.Start (); - this.local_timer.Start (); + EnableWatching (); } } @@ -382,7 +382,7 @@ namespace SparkleLib { { SparkleHelpers.DebugInfo ("SyncDown", "[" + Name + "] Initiated"); this.remote_timer.Stop (); - this.local_timer.Stop (); + DisableWatching (); if (SyncStatusChanged != null) SyncStatusChanged (SyncStatus.SyncDown); @@ -415,19 +415,21 @@ namespace SparkleLib { SyncStatusChanged (SyncStatus.Idle); this.remote_timer.Start (); - this.local_timer.Start (); + EnableWatching (); } public void DisableWatching () { this.watcher.EnableRaisingEvents = false; + this.local_timer.Stop (); } public void EnableWatching () { this.watcher.EnableRaisingEvents = true; + this.local_timer.Start (); }