Diff

mod_storage_xmlarchive/mod_storage_xmlarchive.lua @ 2041:7c61ab512d0b

mod_storage_xmlarchive: Return earlier if attempting to delete messages older than the oldest existing
author Kim Alvefur <zash@zash.se>
date Tue, 02 Feb 2016 16:28:12 +0100
parent 2040:459e1878d23c
child 2054:b7c528027762
line wrap: on
line diff
--- a/mod_storage_xmlarchive/mod_storage_xmlarchive.lua	Tue Feb 02 16:27:38 2016 +0100
+++ b/mod_storage_xmlarchive/mod_storage_xmlarchive.lua	Tue Feb 02 16:28:12 2016 +0100
@@ -187,6 +187,7 @@
 		if not err then return true end -- already empty
 		return dates, err;
 	end
+	if dates[1] > before then return true; end -- Nothing to delete
 	local remaining_dates = {};
 	for d = 1, #dates do
 		if dates[d] >= before then