From 55cdd0a7087649f361b69d7d3ab5e935271f1954 Mon Sep 17 00:00:00 2001 From: shaohuzhang1 <80892890+shaohuzhang1@users.noreply.github.com> Date: Wed, 26 Mar 2025 10:31:31 +0800 Subject: [PATCH] fix: Zip with title cannot be parsed (#2683) --- apps/common/handle/impl/zip_split_handle.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/common/handle/impl/zip_split_handle.py b/apps/common/handle/impl/zip_split_handle.py index 5d12c5a32..916bbee53 100644 --- a/apps/common/handle/impl/zip_split_handle.py +++ b/apps/common/handle/impl/zip_split_handle.py @@ -28,6 +28,7 @@ from common.util.common import parse_md_image from dataset.models import Image from django.utils.translation import gettext_lazy as _ + class FileBufferHandle: buffer = None @@ -75,6 +76,7 @@ def get_image_list(result_list: list, zip_files: List[str]): if search: new_image_id = str(uuid.uuid1()) source_image_path = search.group().replace('(', '').replace(')', '') + source_image_path = source_image_path.strip().split(" ")[0] image_path = urljoin(result.get('name'), '.' + source_image_path if source_image_path.startswith( '/') else source_image_path) if not zip_files.__contains__(image_path):