Merge pull request #116 from capitalthought/master

Polling#watch_change should use listener directory, not Dir.pwd
This commit is contained in:
Thibaud Guillaume-Gentil 2011-08-12 12:35:28 -07:00
commit f45f598029

View File

@ -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