Skip to content
Browse files

Fixed that every successive call on the sqlite adapter prepended RAIL…

…S_ROOT again and again because RAILS_ROOT itself is the Windows absolute path which begins with the drive letter #294

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@139 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 1f9243c commit df9276e8b9a64a08bd294361e8c56b50182d2663 @dhh dhh committed Dec 12, 2004
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
View
2 activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
@@ -13,7 +13,7 @@ def self.sqlite_connection(config) # :nodoc:
raise ArgumentError, "No database file specified. Missing argument: dbfile"
end
- config[:dbfile] = File.join(RAILS_ROOT, config[:dbfile]) if config[:dbfile] =~ /^\w/ && Object.const_defined?(:RAILS_ROOT)
+ config[:dbfile] = File.expand_path(config[:dbfile], RAILS_ROOT) if Object.const_defined?(:RAILS_ROOT)
db = SQLite::Database.new(config[:dbfile], 0)
db.show_datatypes = "ON" if !defined? SQLite::Version

0 comments on commit df9276e

Please sign in to comment.
Something went wrong with that request. Please try again.