mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-21 21:22:11 -03:00
fix: Preserve original path separators when mapping real paths in Config. Fixes https://github.com/willmiao/ComfyUI-Lora-Manager/issues/132
This commit is contained in:
@@ -110,7 +110,7 @@ class Config:
|
|||||||
for path in raw_paths:
|
for path in raw_paths:
|
||||||
if os.path.exists(path):
|
if os.path.exists(path):
|
||||||
real_path = os.path.normpath(os.path.realpath(path)).replace(os.sep, '/')
|
real_path = os.path.normpath(os.path.realpath(path)).replace(os.sep, '/')
|
||||||
path_map[real_path] = path_map.get(real_path, path) # preserve first seen
|
path_map[real_path] = path_map.get(real_path, path.replace(os.sep, "/")) # preserve first seen
|
||||||
|
|
||||||
# Now sort and use only the deduplicated real paths
|
# Now sort and use only the deduplicated real paths
|
||||||
unique_paths = sorted(path_map.values(), key=lambda p: p.lower())
|
unique_paths = sorted(path_map.values(), key=lambda p: p.lower())
|
||||||
|
|||||||
Reference in New Issue
Block a user