issue 1614: fix os path separator dependency (#1615)

This commit is contained in:
Phil Miesle 2024-04-05 14:31:02 +01:00 committed by GitHub
commit 528f7ddb90
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4,6 +4,7 @@ import inspect
import types
from enum import Enum
from typing import TYPE_CHECKING, Any, AsyncIterator, Callable, Dict, Iterator, List, Optional
import os
from loguru import logger
@ -305,7 +306,7 @@ class Vertex:
if file_path := field.get("file_path"):
storage_service = get_storage_service()
try:
flow_id, file_name = file_path.split("/")
flow_id, file_name = os.path.split(file_path)
full_path = storage_service.build_full_path(flow_id, file_name)
except ValueError as e:
if "too many values to unpack" in str(e):