Remove Dir.chdir in the Webrick DispatchServlet#initialize method. Fix bad path errors when trying to load config/routes.rb. [Rick Olson]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4899 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Rick Olson
2006-09-02 15:50:52 +00:00
parent 7aa9eed88f
commit 03de0cfe7a
2 changed files with 2 additions and 1 deletions

View File

@@ -1,5 +1,7 @@
*SVN*
* Remove Dir.chdir in the Webrick DispatchServlet#initialize method. Fix bad path errors when trying to load config/routes.rb. [Rick Olson]
* Tighten rescue clauses. #5985 [james@grayproductions.net]
* Cleaning up tests. [Kevin Clark, Jeremy Kemper]

View File

@@ -66,7 +66,6 @@ class DispatchServlet < WEBrick::HTTPServlet::AbstractServlet
def initialize(server, options) #:nodoc:
@server_options = options
@file_handler = WEBrick::HTTPServlet::FileHandler.new(server, options[:server_root])
Dir.chdir("#{RAILS_ROOT}/public") if defined?(RAILS_ROOT) && File.directory?("#{RAILS_ROOT}/public")
super
end