From 4150f4014c5cc40d891573d75e136663adfaee75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E9=9B=85=20=C2=B7=20Misaki=20Masa?= Date: Fri, 9 Aug 2024 21:50:28 +0800 Subject: [PATCH] fix: 7zip shows different error messages for wrong password (#1451) --- 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 4fcc5761..d10c0e2f 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