Skip to content

Commit 675adee

Browse files
committed
fix: exclude macOS specific files from zip processing
--bug=1054264 --user=刘瑞斌 【知识库】QA问答对模式,导入在mac上压缩的zip文件,会出现2个乱码文档 https://www.tapd.cn/57709429/s/1681034
1 parent 6bc00eb commit 675adee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/common/handle/impl/zip_split_handle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def handle(self, file, pattern_list: List, with_filter: bool, limit: int, get_bu
126126
files = zip_ref.namelist()
127127
# 读取压缩包中的文件内容
128128
for file in files:
129-
if file.endswith('/'):
129+
if file.endswith('/') or file.startswith('__MACOSX'):
130130
continue
131131
with zip_ref.open(file) as f:
132132
# 对文件内容进行处理

0 commit comments

Comments
 (0)