Merge pull request #116 from capitalthought/master
Polling#watch_change should use listener directory, not Dir.pwd
This commit is contained in:
commit
f45f598029
@ -22,7 +22,7 @@ module Guard
|
|||||||
def watch_change
|
def watch_change
|
||||||
until @stop
|
until @stop
|
||||||
start = Time.now.to_f
|
start = Time.now.to_f
|
||||||
files = modified_files([Dir.pwd], :all => true)
|
files = modified_files([@directory], :all => true)
|
||||||
@callback.call(files) unless files.empty?
|
@callback.call(files) unless files.empty?
|
||||||
nap_time = @latency - (Time.now.to_f - start)
|
nap_time = @latency - (Time.now.to_f - start)
|
||||||
sleep(nap_time) if nap_time > 0
|
sleep(nap_time) if nap_time > 0
|
||||||
|
Loading…
Reference in New Issue
Block a user