Skip to content

Commit 55cdd0a

Browse files
authored
fix: Zip with title cannot be parsed (#2683)
1 parent f9d536f commit 55cdd0a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

apps/common/handle/impl/zip_split_handle.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
from dataset.models import Image
2929
from django.utils.translation import gettext_lazy as _
3030

31+
3132
class FileBufferHandle:
3233
buffer = None
3334

@@ -75,6 +76,7 @@ def get_image_list(result_list: list, zip_files: List[str]):
7576
if search:
7677
new_image_id = str(uuid.uuid1())
7778
source_image_path = search.group().replace('(', '').replace(')', '')
79+
source_image_path = source_image_path.strip().split(" ")[0]
7880
image_path = urljoin(result.get('name'), '.' + source_image_path if source_image_path.startswith(
7981
'/') else source_image_path)
8082
if not zip_files.__contains__(image_path):

0 commit comments

Comments
 (0)