From 3c71eecbd818802cb4d540caf64c3653d6682e94 Mon Sep 17 00:00:00 2001 From: anor Date: Thu, 26 Mar 2026 15:13:39 +1000 Subject: [PATCH] =?UTF-8?q?fix:=20=D1=84=D0=B8=D0=BB=D1=8C=D1=82=D1=80?= =?UTF-8?q?=D0=B0=D1=86=D0=B8=D1=8F=20macOS=20.=5F=D1=84=D0=B0=D0=B9=D0=BB?= =?UTF-8?q?=D0=BE=D0=B2=20=D0=B8=20=5F=5FMACOSX=20=D0=BF=D1=80=D0=B8=20?= =?UTF-8?q?=D0=B8=D0=B7=D0=B2=D0=BB=D0=B5=D1=87=D0=B5=D0=BD=D0=B8=D0=B8=20?= =?UTF-8?q?zip?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ._ЛС-01-02-4-00-01 ВСП.xlsx — macOS resource fork, не настоящий xlsx. Claude пытался его прочитать → верификация фейлила. Теперь: не извлекаем ._ и __MACOSX из архива вообще. Co-Authored-By: Claude Opus 4.6 (1M context) --- batch.py | 6 +++++- static/batch3.html | 15 +++++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/batch.py b/batch.py index ff819c9..0f2d356 100644 --- a/batch.py +++ b/batch.py @@ -130,10 +130,14 @@ def extract_zip(zip_path: str, dest_dir: str) -> list[str]: info.filename = fixed except (UnicodeDecodeError, UnicodeEncodeError): pass # keep original if re-decode fails + # Skip macOS resource fork files and __MACOSX directory + basename = Path(info.filename).name + if basename.startswith('._') or '__MACOSX' in info.filename: + continue z.extract(info, dest_dir) files = [] for f in Path(dest_dir).rglob('*.xlsx'): - if not f.name.startswith('~$'): + if not f.name.startswith('~$') and not f.name.startswith('._'): files.append(str(f)) return sorted(files) diff --git a/static/batch3.html b/static/batch3.html index da6d1b1..af61de8 100644 --- a/static/batch3.html +++ b/static/batch3.html @@ -92,8 +92,19 @@ pre { background: #2c2c2c; color: #f5f0eb; padding: .8rem; border-radius: 6px; o