Comparison

core/storagemanager.lua @ 7157:0890a428a99b

Merge 0.10->trunk
author Kim Alvefur <zash@zash.se>
date Wed, 10 Feb 2016 07:57:58 +0100
parent 6952:db085e55555f
parent 7152:ca64255bf7cd
child 7245:210d8329dc70
comparison
equal deleted inserted replaced
7148:a461946fe865 7157:0890a428a99b
116 end 116 end
117 end 117 end
118 current[key] = data; 118 current[key] = data;
119 return self.keyval_store:set(username, current); 119 return self.keyval_store:set(username, current);
120 end; 120 end;
121 set_keys = function (self, username, keydatas)
122 local current, err = self.keyval_store:get(username);
123 if current == nil then
124 if err then
125 return nil, err;
126 else
127 current = keydatas;
128 end
129 else
130 for k,v in pairs(keydatas) do
131 if v == self.remove then v = nil; end
132 current[k] = v;
133 end
134 end
135 return self.keyval_store:set(username, current);
136 end;
137 remove = {};
121 }; 138 };
122 } 139 }
123 140
124 local open; -- forward declaration 141 local open; -- forward declaration
125 142