Merge trunk->0.10
authorKim Alvefur <zash@zash.se>
Sun, 6 Mar 2016 17:52:22 +0000 (18:52 +0100)
committerKim Alvefur <zash@zash.se>
Sun, 6 Mar 2016 17:52:22 +0000 (18:52 +0100)
1  2 
core/storagemanager.lua

diff --combined core/storagemanager.lua
index de68c2ac97fe37ec44d306d480da8bf0e0ae765f,680b65ad526753637d52c12c302452ffc125a919..2d6d93f697004cac5b1061683c041a61ff598fd7
@@@ -123,14 -123,12 +123,12 @@@ local map_shim_mt = 
                        if current == nil then
                                if err then
                                        return nil, err;
-                               else
-                                       current = keydatas;
-                               end
-                       else
-                               for k,v in pairs(keydatas) do
-                                       if v == self.remove then v = nil; end
-                                       current[k] = v;
                                end
+                               current = {};
+                       end
+                       for k,v in pairs(keydatas) do
+                               if v == self.remove then v = nil; end
+                               current[k] = v;
                        end
                        return self.keyval_store:set(username, current);
                end;
        };
  }
  
 -local open;
 +local open; -- forward declaration
  
  local function create_map_shim(host, store)
        local keyval_store, err = open(host, store, "keyval");