fix: 7zip shows different error messages for wrong password (#1451)

This commit is contained in:
三咲雅 · Misaki Masa 2024-08-09 21:50:28 +08:00 committed by GitHub
parent 3bb867c5bd
commit 4150f4014c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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