# HG changeset patch # User Waqas Hussain # Date 1292116508 -18000 # Node ID b77bb597bcb0df324ccc307214208135296c6b89 # Parent 5a1551d604b1b58d8209a5aba8a432e56b7142d3 storagemanager: When we have a cached data driver, we are supposed to use it. diff -r 5a1551d604b1 -r b77bb597bcb0 core/storagemanager.lua --- a/core/storagemanager.lua Sun Dec 12 05:39:24 2010 +0500 +++ b/core/storagemanager.lua Sun Dec 12 06:15:08 2010 +0500 @@ -44,13 +44,12 @@ return; end local driver = stores_available:get(host, driver_name); - if not driver then - if driver_name ~= "internal" then - modulemanager.load(host, "storage_"..driver_name); - return stores_available:get(host, driver_name); - else - return setmetatable({host = host}, default_driver_mt); - end + if driver then return driver; end + if driver_name ~= "internal" then + modulemanager.load(host, "storage_"..driver_name); + return stores_available:get(host, driver_name); + else + return setmetatable({host = host}, default_driver_mt); end end