From dd2ef7ae865aae4bd795f40f386a7604bf80ad66 Mon Sep 17 00:00:00 2001 From: sxyazi Date: Fri, 9 Aug 2024 21:33:50 +0800 Subject: [PATCH] fix: 7zip shows different error messages for wrong password --- yazi-plugin/preset/plugins/archive.lua | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/yazi-plugin/preset/plugins/archive.lua b/yazi-plugin/preset/plugins/archive.lua index 4fcc57614..d10c0e2f9 100644 --- a/yazi-plugin/preset/plugins/archive.lua +++ b/yazi-plugin/preset/plugins/archive.lua @@ -137,9 +137,6 @@ function M:list_files(args, skip, limit) return files, i, code end -function M:is_encrypted(s) - return s:find("Cannot open encrypted archive. Wrong password?", 1, true) - or s:find("Data Error in encrypted file. Wrong password?", 1, true) -end +function M:is_encrypted(s) return s:find(". Wrong password?", 1, true) end return M