aboutsummaryrefslogtreecommitdiffstats
path: root/core/storagemanager.lua
diff options
context:
space:
mode:
Diffstat (limited to 'core/storagemanager.lua')
-rw-r--r--core/storagemanager.lua13
1 files changed, 6 insertions, 7 deletions
diff --git a/core/storagemanager.lua b/core/storagemanager.lua
index db540042..e0c12190 100644
--- a/core/storagemanager.lua
+++ b/core/storagemanager.lua
@@ -44,13 +44,12 @@ local function load_driver(host, driver_name)
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