Skip to content

Commit

Permalink
Check whether a Pathname exists before calling realpath in build. Closes
Browse files Browse the repository at this point in the history
  • Loading branch information
tdreyno committed Aug 21, 2012
1 parent 5a88184 commit f7fc041
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion middleman-core/lib/middleman-core/cli/build.rb
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,10 @@ def execute!

output_path = base.render_to_file(resource)

@cleaning_queue.delete(Pathname.new(output_path).realpath) if cleaning?
if cleaning?
pn = Pathname(output_path)
@cleaning_queue.delete(pn.realpath) if pn.exist?
end
end

::Middleman::Profiling.report("build")
Expand Down

0 comments on commit f7fc041

Please sign in to comment.