Get the real path of the files and ensure uniqueness

This commit is contained in:
Paul van Tilburg 2018-06-22 22:59:28 +02:00
parent c81a670261
commit 49991c8924
1 changed files with 1 additions and 1 deletions

View File

@ -188,7 +188,7 @@ end
# Add input file with dependancies to the watch list and start event loop.
notifier = INotify::Notifier.new
dirs = files.map { |file| File.dirname(file) }
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|