Comparison

core/storagemanager.lua @ 7151:584d5229cb91

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 7150:fcaaafe4062f
child 7152:ca64255bf7cd
comparison
equal deleted inserted replaced
7150:fcaaafe4062f 7151:584d5229cb91
101 101
102 local map_shim_mt = { 102 local map_shim_mt = {
103 __index = { 103 __index = {
104 get = function(self, username, key) 104 get = function(self, username, key)
105 local ret, err = self.keyval_store:get(username); 105 local ret, err = self.keyval_store:get(username);
106 if ret == nil and err then return nil, err end 106 if ret == nil then return nil, err end
107 return ret[key]; 107 return ret[key];
108 end; 108 end;
109 set = function(self, username, key, data) 109 set = function(self, username, key, data)
110 local current, err = self.keyval_store:get(username); 110 local current, err = self.keyval_store:get(username);
111 if current == nil then 111 if current == nil then