The file watcher knows which files exist, so don't use slow File.exists?
Possible solution for #903
This commit is contained in:
parent
fc37ef9b99
commit
c9d151ba66
3 changed files with 12 additions and 5 deletions
|
@ -476,7 +476,7 @@ module Middleman
|
|||
end
|
||||
|
||||
# If we found one, return it and the found engine
|
||||
if found_path || (File.exists?(on_disk_path) && !File.directory?(on_disk_path))
|
||||
if found_path || files.exists?(on_disk_path)
|
||||
engine = found_path ? File.extname(found_path)[1..-1].to_sym : nil
|
||||
[ found_path || on_disk_path, engine ]
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue