public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
Search Repo:
Added more informative error message for "file not found" 
situation in send_file #484 [Alexey]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@427 
5ecf4fe2-1ee6-0310-87b1-e25e094e27de
dhh (author)
Sun Jan 16 05:06:15 -0800 2005
commit  9a33b9a73745401c1c715ee65f7e30f029d3e6a7
tree    ab60f27f905b891d97d14567caa541f7d8aeca86
parent  bc4156e09e558260cc39a238ca4d17b44208ce2a
...
441
442
443
444
 
445
446
447
...
441
442
443
 
444
445
446
447
0
@@ -441,7 +441,7 @@
0
       # http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9
0
       # for the Cache-Control header spec.
0
       def send_file(path, options = {}) #:doc:
0
- raise MissingFile, path unless File.file?(path) and File.readable?(path)
0
+ raise MissingFile, "Cannot read file #{path}" unless File.file?(path) and File.readable?(path)
0
 
0
         options[:length] ||= File.size(path)
0
         options[:filename] ||= File.basename(path)

Comments

    No one has commented yet.