aboutsummaryrefslogtreecommitdiffstats
path: root/core/storagemanager.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2016-08-31 11:45:06 +0100
committerMatthew Wild <mwild1@gmail.com>2016-08-31 11:45:06 +0100
commit297a9717b04f20bb8211463cc82b39e6dd245feb (patch)
tree32e1e48a3d938ef04983b994c5a5e615e176c09a /core/storagemanager.lua
parent7fbe7a6a2fd31524189a1277279d05a46b86e9a3 (diff)
downloadprosody-297a9717b04f20bb8211463cc82b39e6dd245feb.tar.gz
prosody-297a9717b04f20bb8211463cc82b39e6dd245feb.zip
storagemanager: Simplify function flow
Diffstat (limited to 'core/storagemanager.lua')
-rw-r--r--core/storagemanager.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/storagemanager.lua b/core/storagemanager.lua
index 8d83f677..64ae13e3 100644
--- a/core/storagemanager.lua
+++ b/core/storagemanager.lua
@@ -153,12 +153,12 @@ function open(host, store, typ)
if err == "unsupported-store" then
if typ == "map" then -- Use shim on top of keyval store
log("debug", "map storage driver unavailable, using shim on top of keyval store.");
- return create_map_shim(host, store);
+ ret, err = create_map_shim(host, store);
+ else
+ log("debug", "Storage driver %s does not support store %s (%s), falling back to null driver",
+ driver_name, store, typ or "<nil>");
+ ret, err = null_storage_driver, nil;
end
- log("debug", "Storage driver %s does not support store %s (%s), falling back to null driver",
- driver_name, store, typ or "<nil>");
- ret = null_storage_driver;
- err = nil;
end
end
return ret, err;