mirror of https://github.com/rails/rails
Fixed that every successive call on the sqlite adapter prepended RAILS_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
This commit is contained in:
parent
1f9243c13e
commit
df9276e8b9
|
@ -13,7 +13,7 @@ module ActiveRecord
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue