From babc80d842daa72c9aa1728eba98c2368726b68a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E9=9B=85=20misaki=20masa?= Date: Sun, 11 Jan 2026 18:16:05 +0800 Subject: [PATCH] feat: exclude Apple Resource Forks (`__MACOSX`) from archive preview (#3548) --- yazi-plugin/preset/plugins/archive.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yazi-plugin/preset/plugins/archive.lua b/yazi-plugin/preset/plugins/archive.lua index bc1601b0..088558ee 100644 --- a/yazi-plugin/preset/plugins/archive.lua +++ b/yazi-plugin/preset/plugins/archive.lua @@ -108,7 +108,7 @@ end ---@return table files ---@return Error? err function M.list_archive(args, skip, limit) - local child = M.spawn_7z { "l", "-ba", "-slt", "-sccUTF-8", table.unpack(args) } + local child = M.spawn_7z { "l", "-ba", "-slt", "-sccUTF-8", "-xr!__MACOSX", table.unpack(args) } if not child then return {}, Err("Failed to start either `7zz` or `7z`. Do you have 7-zip installed?") end @@ -128,7 +128,7 @@ end function M.list_compressed_tar(args, skip, limit) local src, dst = M.spawn_7z_piped( { "x", "-so", table.unpack(args) }, - { "l", "-ba", "-slt", "-ttar", "-sccUTF-8", "-si" } + { "l", "-ba", "-slt", "-ttar", "-sccUTF-8", "-xr!__MACOSX", "-si" } ) if not dst then return {}, Err("Failed to start either `7zz` or `7z`. Do you have 7-zip installed?")