aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-03-06 18:52:22 +0100
committerKim Alvefur <zash@zash.se>2016-03-06 18:52:22 +0100
commitcce0c6c56f64ff81c86e8aaaa79144a5e7e2d5fe (patch)
tree1b515562c7b44102f77bb4fd6ec1f232db3b4ee1 /core
parentf5667bbf8769dc0524e36c4ab043e15175f76e27 (diff)
parent3f2145c47781bd36e26d98e9003ef6406fc987a3 (diff)
downloadprosody-cce0c6c56f64ff81c86e8aaaa79144a5e7e2d5fe.tar.gz
prosody-cce0c6c56f64ff81c86e8aaaa79144a5e7e2d5fe.zip
Merge trunk->0.10
Diffstat (limited to 'core')
-rw-r--r--core/storagemanager.lua12
1 files changed, 5 insertions, 7 deletions
diff --git a/core/storagemanager.lua b/core/storagemanager.lua
index de68c2ac..2d6d93f6 100644
--- a/core/storagemanager.lua
+++ b/core/storagemanager.lua
@@ -123,14 +123,12 @@ local map_shim_mt = {
if current == nil then
if err then
return nil, err;
- else
- current = keydatas;
- end
- else
- for k,v in pairs(keydatas) do
- if v == self.remove then v = nil; end
- current[k] = v;
end
+ current = {};
+ end
+ for k,v in pairs(keydatas) do
+ if v == self.remove then v = nil; end
+ current[k] = v;
end
return self.keyval_store:set(username, current);
end;