def listen_ignore_paths(options)
source = Pathname.new(options['source']).expand_path
paths = to_exclude(options)
paths.map do |p|
absolute_path = Pathname.new(p).expand_path
next unless absolute_path.exist?
begin
relative_path = absolute_path.relative_path_from(source).to_s
unless relative_path.start_with?('../')
path_to_ignore = Regexp.new(Regexp.escape(relative_path))
Jekyll.logger.debug "Watcher:", "Ignoring #{path_to_ignore}"
path_to_ignore
end
rescue ArgumentError
end
end.compact + [/\.jekyll\-metadata/]
end