diff --git a/lib/hotwire/spark/file_watcher.rb b/lib/hotwire/spark/file_watcher.rb index 04be3fc7..fea9bfee 100644 --- a/lib/hotwire/spark/file_watcher.rb +++ b/lib/hotwire/spark/file_watcher.rb @@ -25,7 +25,13 @@ def expand_path(path) end def paths - @callbacks_by_path.keys + only_existing_paths @callbacks_by_path.keys + end + + def only_existing_paths(paths) + paths.select do |path| + path.exist? + end end def process_changed_files(changed_files)