From e053fda829dbb6afb87953bb46c72313678aa6e1 Mon Sep 17 00:00:00 2001 From: sxyazi Date: Thu, 8 Jan 2026 15:30:02 +0800 Subject: [PATCH] fix: call `lower()` before `find()` --- yazi-plugin/preset/plugins/archive.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yazi-plugin/preset/plugins/archive.lua b/yazi-plugin/preset/plugins/archive.lua index 9a0224e5..34ab1b51 100644 --- a/yazi-plugin/preset/plugins/archive.lua +++ b/yazi-plugin/preset/plugins/archive.lua @@ -214,7 +214,7 @@ function M.is_encrypted(s) return s:find(" Wrong password", 1, true) end function M.is_tar(path) return M.list_meta { "-p", tostring(path) } == "tar" end function M.should_decompress_tar(file) - return file.packed_size <= 1024 * 1024 * 1024 and file.path:find(".+%.tar$") ~= nil + return file.packed_size <= 1024 * 1024 * 1024 and file.path:lower():find(".+%.tar$") ~= nil end -- Parse the output of a "7z l -slt" command.