Put mtime (maybe ctime is updated on linux when moving a file)
This commit is contained in:
parent
68efb0d52f
commit
5978e875df
@ -84,7 +84,7 @@ module Guard
|
||||
end
|
||||
|
||||
def modified_files(dirs, options = {})
|
||||
last_event = @last_event.dup
|
||||
last_event = @last_event
|
||||
update_last_event
|
||||
files = potentially_modified_files(dirs, options).select { |path| file_modified?(path, last_event) }
|
||||
p "modified_files"
|
||||
@ -150,6 +150,7 @@ module Guard
|
||||
p @last_event.to_i
|
||||
p last_event.to_i
|
||||
p File.ctime(path).to_i
|
||||
p File.mtime(path).to_i
|
||||
if File.ctime(path).to_i == last_event.to_i
|
||||
p "File.ctime == last_event"
|
||||
res = file_content_modified?(path, sha1_checksum(path))
|
||||
|
@ -4,6 +4,6 @@ require 'guard/listeners/polling'
|
||||
describe Guard::Polling do
|
||||
subject { Guard::Polling }
|
||||
|
||||
it_should_behave_like "a listener that reacts to #on_change", 2
|
||||
it_should_behave_like "a listener that reacts to #on_change"
|
||||
it_should_behave_like "a listener scoped to a specific directory"
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user