Mercurial > prosody-modules
comparison mod_storage_xmlarchive/mod_storage_xmlarchive.lua @ 3491:4e9d4b07e3e9
mod_storage_xmlarchive: Remove per day files during migration
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 17 Mar 2019 17:56:54 +0100 |
parents | d73ed7975d82 |
children | f5ea0b886c7c |
comparison
equal
deleted
inserted
replaced
3490:972b21d34306 | 3491:4e9d4b07e3e9 |
---|---|
334 data.when = tonumber(item.when) or dt.parse(item.when); | 334 data.when = tonumber(item.when) or dt.parse(item.when); |
335 data.attr.stamp = item.when; | 335 data.attr.stamp = item.when; |
336 data.attr.stamp_legacy = dt.legacy(data.when); | 336 data.attr.stamp_legacy = dt.legacy(data.when); |
337 assert(dm.list_append(user, host, store, data)); | 337 assert(dm.list_append(user, host, store, data)); |
338 end | 338 end |
339 assert(os.remove(dm.getpath(user .. "@" .. date, host, store, "list"))); | |
340 assert(os.remove(dm.getpath(user .. "@" .. date, host, store, "xml"))); | |
339 end | 341 end |
340 end | 342 end |
341 else -- convert from internal | 343 else -- convert from internal |
342 function convert(user, host, store) | 344 function convert(user, host, store) |
343 local items, err = dm.list_load(user, host, store); | 345 local items, err = dm.list_load(user, host, store); |