feat: remove path separator normalization for cross-platform compatibility

Removed the forced normalization of path separators to forward slashes in BaseModelService to maintain platform-specific separators. Updated test cases to use os.sep for constructing expected paths, ensuring tests work correctly across different operating systems while preserving native path representations.
This commit is contained in:
Will Miao
2025-12-17 19:07:08 +08:00
parent a07720a3bf
commit ca6bb43406
2 changed files with 4 additions and 5 deletions

View File

@@ -716,8 +716,6 @@ class BaseModelService(ABC):
if normalized_file.startswith(normalized_root):
# Remove root and leading separator to get relative path
relative_path = normalized_file[len(normalized_root):].lstrip(os.sep)
# Normalize separators so results are stable across platforms
relative_path = relative_path.replace(os.sep, "/")
break
if not relative_path: