Get the real path of the files and ensure uniqueness
This commit is contained in:
parent
c81a670261
commit
49991c8924
2
rubberin
2
rubberin
|
@ -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|
|
||||
|
|
Loading…
Reference in New Issue