Comparison

core/storagemanager.lua @ 6336:11510d4d3b57

storagemanager: Fix map store shim if store is empty
author Kim Alvefur <zash@zash.se>
date Fri, 08 Aug 2014 12:38:35 +0200
parent 6330:a678d15e590e
child 6557:8aa967c81cbc
comparison
equal deleted inserted replaced
6335:eaf6e7986934 6336:11510d4d3b57
82 82
83 local map_shim_mt = { 83 local map_shim_mt = {
84 __index = { 84 __index = {
85 get = function(self, username, key) 85 get = function(self, username, key)
86 local ret, err = self.keyval_store:get(username); 86 local ret, err = self.keyval_store:get(username);
87 if ret == nil and err then return nil, err end 87 if ret == nil then return nil, err end
88 return ret[key]; 88 return ret[key];
89 end; 89 end;
90 set = function(self, username, key, data) 90 set = function(self, username, key, data)
91 local current, err = self.keyval_store:get(username); 91 local current, err = self.keyval_store:get(username);
92 if current == nil then 92 if current == nil then