mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: exclude macOS specific files from zip processing
--bug=1054264 --user=刘瑞斌 【知识库】QA问答对模式,导入在mac上压缩的zip文件,会出现2个乱码文档 https://www.tapd.cn/57709429/s/1681034
This commit is contained in:
parent
6bc00eb869
commit
675adeeb63
|
|
@ -126,7 +126,7 @@ class ZipSplitHandle(BaseSplitHandle):
|
|||
files = zip_ref.namelist()
|
||||
# 读取压缩包中的文件内容
|
||||
for file in files:
|
||||
if file.endswith('/'):
|
||||
if file.endswith('/') or file.startswith('__MACOSX'):
|
||||
continue
|
||||
with zip_ref.open(file) as f:
|
||||
# 对文件内容进行处理
|
||||
|
|
|
|||
Loading…
Reference in New Issue