Land #2352 - Expand path to database config

bug/bundler_fix
sinn3r 2013-09-16 01:51:51 -05:00
commit 4be0601c73
1 changed files with 2 additions and 1 deletions

View File

@ -1546,7 +1546,8 @@ class Db
return
end
file = args[1] || ::File.join(Msf::Config.get_config_root, "database.yml")
if (::File.exists? ::File.expand_path(file))
file = ::File.expand_path(file)
if (::File.exists? file)
db = YAML.load(::File.read(file))['production']
framework.db.connect(db)