# HG changeset patch # User Kim Alvefur # Date 1427301673 -3600 # Node ID 98427ed3d53fa07c11b85886ff61ac3fc099967b # Parent 0fcd63818aa1ce262ab2f5bb9697aa2c4cec5524 mod_storage_gdbm: Update archive metadata only if data write succeeds diff -r 0fcd63818aa1 -r 98427ed3d53f mod_storage_gdbm/mod_storage_gdbm.lua --- a/mod_storage_gdbm/mod_storage_gdbm.lua Wed Mar 25 17:39:29 2015 +0100 +++ b/mod_storage_gdbm/mod_storage_gdbm.lua Wed Mar 25 17:41:13 2015 +0100 @@ -78,9 +78,9 @@ end meta[i] = { key = key, when = when, with = with, type = type }; meta[key] = i; - local ok, err = self:set(username, meta); + local ok, err = self:set(key, value); if not ok then return nil, err; end - ok, err = self:set(key, value); + ok, err = self:set(username, meta); if not ok then return nil, err; end return key; end