Againt, the directory is a Pathname object now

This commit is contained in:
Paul van Tilburg 2018-06-22 23:13:37 +02:00
parent 3a5609a5a3
commit 11cd5be441
1 changed files with 1 additions and 1 deletions

View File

@ -191,7 +191,7 @@ notifier = INotify::Notifier.new
dirs = files.map { |file| Pathname.new(file).dirname.realpath }.uniq
dirs.each do |dir|
# Set up a watch per directory
notifier.watch(dir, :close_write) do |ev|
notifier.watch(dir.to_s, :close_write) do |ev|
# Only compile if a dependency of the input file has been modified
file_path = (dir + ev.name).to_s
next unless files.include? file_path