Changeset

10024:4a0d990253a0

mod_storage_internal: Return appropriate error even with empty archive
author Kim Alvefur <zash@zash.se>
date Sun, 05 May 2019 07:24:12 +0200
parents 10023:f6959fe81a1d
children 10025:4498f601516d
files plugins/mod_storage_internal.lua
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_storage_internal.lua	Sun May 05 07:22:18 2019 +0200
+++ b/plugins/mod_storage_internal.lua	Sun May 05 07:24:12 2019 +0200
@@ -125,6 +125,9 @@
 		if err then
 			return items, err;
 		elseif query then
+			if query.before or query.after then
+				return nil, "item-not-found";
+			end
 			if query.total then
 				return function () end, 0;
 			end