fix: 7zip shows different error messages for RAR and ZIP files

This commit is contained in:
sxyazi 2024-08-11 17:28:53 +08:00
parent 44f45fd8e1
commit a8c9aff1e6
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View file

@ -28,7 +28,7 @@ impl Manager {
// Hover on the file
render!(self.current_or_mut(opt.tab).repos(opt.url.as_ref()));
if opt.url.zip(self.current().hovered()).is_some_and(|(u, f)| u == f.url) {
if opt.url.zip(self.current_or(opt.tab).hovered()).is_some_and(|(u, f)| u == f.url) {
// `hover(Some)` occurs after user actions, such as create, rename, reveal, etc.
// At this point, it's intuitive to track the location of this file regardless.
self.current_or_mut(opt.tab).tracing = true;

View file

@ -137,6 +137,6 @@ function M:list_files(args, skip, limit)
return files, i, code
end
function M:is_encrypted(s) return s:find(". Wrong password?", 1, true) end
function M:is_encrypted(s) return s:find(" Wrong password", 1, true) end
return M