From 904a7052b2bb483afe5ece8eef879e210899a679 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Wed, 22 Jun 2011 16:02:03 +0100 Subject: [PATCH] repo: ignore external watchers when watching is disabled --- SparkleLib/SparkleRepoBase.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/SparkleLib/SparkleRepoBase.cs b/SparkleLib/SparkleRepoBase.cs index d7e01545..abceb727 100644 --- a/SparkleLib/SparkleRepoBase.cs +++ b/SparkleLib/SparkleRepoBase.cs @@ -297,6 +297,11 @@ namespace SparkleLib { // Starts a timer when something changes public void OnFileActivity (FileSystemEventArgs args) { + // Check the watcher for the occasions where this + // method is called directly + if (!this.watcher.EnableRaisingEvents) + return; + if (args.FullPath.Contains (Path.DirectorySeparatorChar + ".")) return;