Changeset

2062:8f7083b980cf

mod_storage_appendmap: Fix keyvalue:set()
author Kim Alvefur <zash@zash.se>
date Sun, 06 Mar 2016 19:28:21 +0100
parents 2061:b84284144e21
children 2063:6055a0164d63
files mod_storage_appendmap/mod_storage_appendmap.lua
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_storage_appendmap/mod_storage_appendmap.lua	Sun Mar 06 17:03:19 2016 +0100
+++ b/mod_storage_appendmap/mod_storage_appendmap.lua	Sun Mar 06 19:28:21 2016 +0100
@@ -73,7 +73,15 @@
 	return map.get(self, user);
 end
 
-keyval.set = map.set_keys;
+function keyval:set(user, data)
+	map.set(self, user);
+	if data then
+		for k, v in pairs(data) do
+			map.set(self, user, k, v);
+		end
+	end
+	return true;
+end
 
 -- TODO some kind of periodic compaction thing?
 function map:_compact(user)