Skip to content
This repository has been archived by the owner on Feb 14, 2018. It is now read-only.

Commit

Permalink
Bugfix: replace File.exists? with Store.exists?
Browse files Browse the repository at this point in the history
  • Loading branch information
harlantwood committed Apr 30, 2012
1 parent 77ca2aa commit b6ccece
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/sinatra/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def oops status, message
get %r{^/([a-z0-9-]+)\.json$} do |name|
content_type 'application/json'
cross_origin
halt 404 unless File.exists? "#{farm_page.directory}/#{name}" or File.exists? "#{farm_page.default_directory}/#{name}"
halt 404 unless Store.exists?("#{farm_page.directory}/#{name}") || Store.exists?("#{farm_page.default_directory}/#{name}")
JSON.pretty_generate(farm_page.get(name))
end

Expand Down

0 comments on commit b6ccece

Please sign in to comment.