From 1616d15b5565b7cc61bb541823684f93fe2a19c5 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 30 Apr 2020 13:21:08 +0100 Subject: [Minor] More fixes to digests selectors + added tests --- lualib/lua_selectors/extractors.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lualib/lua_selectors') diff --git a/lualib/lua_selectors/extractors.lua b/lualib/lua_selectors/extractors.lua index e800e98e9..532c56592 100644 --- a/lualib/lua_selectors/extractors.lua +++ b/lualib/lua_selectors/extractors.lua @@ -136,8 +136,8 @@ uses any type by default)]], local digests = {} for _,p in ipairs(parts) do if p:get_filename() then - if not args[2] or args[2] == 'blake2' then - -- Optimise as we already have this hash + if #args == 0 then + -- Optimise as we already have this hash in the API table.insert(digests, p:get_digest()) else table.insert(digests, common.create_digest(p:get_content('raw_parsed'), args)) -- cgit v1.2.3