mod_storage_xmlarchive: Only try to close xmlfile if it has been opened (fixes traceback with limit=0)
--- 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