--- a/mod_storage_xmlarchive/mod_storage_xmlarchive.lua Fri Mar 03 12:31:15 2017 +0000
+++ b/mod_storage_xmlarchive/mod_storage_xmlarchive.lua Sat Mar 04 19:52:41 2017 +0100
@@ -45,7 +45,7 @@
-- If the day-file is missing then we need to add it to the list of days
local first_of_day = not lfs.attributes(dm.getpath(username .. "@" .. day, module.host, self.store, "list"));
- local offset = ok and err;
+ local offset = ok and err or 0;
local id = day .. "-" .. hmac_sha256(username.."@"..day.."+"..offset, data, true):sub(-16);
ok, err = dm.list_append(username.."@"..day, module.host, self.store, { id = id, when = dt.datetime(when), with = with, offset = offset, length = #data });