From e846068e89362f47a1937ded6af3f32cddbd0179 Mon Sep 17 00:00:00 2001 From: Rob Eanes Date: Fri, 12 Aug 2011 10:03:06 -0500 Subject: [PATCH] Polling#watch_change should use listener directory, not Dir.pwd --- lib/guard/listeners/polling.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/guard/listeners/polling.rb b/lib/guard/listeners/polling.rb index fad687c..894bff9 100644 --- a/lib/guard/listeners/polling.rb +++ b/lib/guard/listeners/polling.rb @@ -22,7 +22,7 @@ module Guard def watch_change until @stop start = Time.now.to_f - files = modified_files([Dir.pwd], :all => true) + files = modified_files([@directory], :all => true) @callback.call(files) unless files.empty? nap_time = @latency - (Time.now.to_f - start) sleep(nap_time) if nap_time > 0