Clean
This commit is contained in:
parent
e1472cb0c4
commit
f91622adc5
@ -87,8 +87,6 @@ module Guard
|
||||
last_event = @last_event
|
||||
update_last_event
|
||||
files = potentially_modified_files(dirs, options).select { |path| file_modified?(path, last_event) }
|
||||
# p "modified_files"
|
||||
# p files
|
||||
relativize_paths(files)
|
||||
end
|
||||
|
||||
@ -147,27 +145,15 @@ module Guard
|
||||
# both values down to the second for the comparison.
|
||||
# ctime is used only on == comparaison to always catches Rails 3.1 Assets pipelined on Mac OSX
|
||||
def file_modified?(path, last_event)
|
||||
# p path
|
||||
# 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))
|
||||
# p res.to_s
|
||||
res
|
||||
file_content_modified?(path, sha1_checksum(path))
|
||||
elsif File.mtime(path).to_i > last_event.to_i
|
||||
# p "File.ctime > last_event"
|
||||
set_sha1_checksums_hash(path, sha1_checksum(path))
|
||||
# p "true"
|
||||
true
|
||||
else
|
||||
# p "false"
|
||||
false
|
||||
end
|
||||
rescue
|
||||
# p "false"
|
||||
false
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user