summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lualib/lua_selectors/extractors.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/lualib/lua_selectors/extractors.lua b/lualib/lua_selectors/extractors.lua
index e0d692135..e800e98e9 100644
--- a/lualib/lua_selectors/extractors.lua
+++ b/lualib/lua_selectors/extractors.lua
@@ -136,7 +136,13 @@ uses any type by default)]],
local digests = {}
for _,p in ipairs(parts) do
if p:get_filename() then
- table.insert(digests, common.create_digest(p:get_content('raw_parsed'), args))
+ if not args[2] or args[2] == 'blake2' then
+ -- Optimise as we already have this hash
+ table.insert(digests, p:get_digest())
+ else
+ table.insert(digests, common.create_digest(p:get_content('raw_parsed'), args))
+ end
+
end
end