mod_storage_memory: Fix saving of remaining items during deletion

All data is compiled into functions that return new copies in order to
prevent mutation of stored data.

This has downsides.

Also an ugly hack.
vault/0.11
Kim Alvefur 7 years ago
parent dc5efd855b
commit beedd0937e
  1. 2
      plugins/mod_storage_memory.lua

@ -128,7 +128,7 @@ function archive_store:delete(username, query)
i = old[i];
t = i.when;
if not(qstart >= t and qend <= t and (not qwith or i.with == qwith)) then
self:append(username, i.key, i.value, t, i.with);
self:append(username, i.key, i.value(), t, i.with);
end
end
if #new == 0 then

Loading…
Cancel
Save