Mercurial > prosody-modules
diff mod_storage_xmlarchive/mod_storage_xmlarchive.lua @ 2054:b7c528027762
mod_storage_xmlarchive: Only try to close xmlfile if it has been opened (fixes traceback with limit=0)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 28 Feb 2016 16:23:30 +0100 |
parents | 7c61ab512d0b |
children | 13a8bbf256dd |
line wrap: on
line diff
--- a/mod_storage_xmlarchive/mod_storage_xmlarchive.lua Wed Feb 24 15:59:18 2016 +0100 +++ b/mod_storage_xmlarchive/mod_storage_xmlarchive.lua Sun Feb 28 16:23:30 2016 +0100 @@ -99,7 +99,7 @@ local first_item, last_item; return function () - if limit and count >= limit then xmlfile:close() return; end + if limit and count >= limit then if xmlfile then xmlfile:close() end return; end local filename; for d = start_day, last_day, step do