changeset 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
parents 459e1878d23c
children 752eee154891
files mod_storage_xmlarchive/mod_storage_xmlarchive.lua
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
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