mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-23 22:22:11 -03:00
feat(config): seed root symlink mappings before deep scanning
Add `_seed_root_symlink_mappings` method to ensure symlinked root folders are recorded before deep scanning, preventing them from being missed during directory traversal. This ensures that root symlinks are properly captured in the path mappings. Additionally, normalize separators in relative paths for cross-platform consistency in `BaseModelService`, and update tests to verify root symlinks are preserved in the cache.
This commit is contained in:
@@ -716,6 +716,8 @@ 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:
|
||||
|
||||
Reference in New Issue
Block a user