Diff

mod_storage_appendmap/mod_storage_appendmap.lua @ 2062:8f7083b980cf

mod_storage_appendmap: Fix keyvalue:set()
author Kim Alvefur <zash@zash.se>
date Sun, 06 Mar 2016 19:28:21 +0100
parent 2061:b84284144e21
child 2205:98354fbea63c
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)