mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-04-15 04:52:31 +08:00
On Windows, os.path.commonpath raises ValueError when the two paths reside on different drives (e.g. C:\ vs D:\). This crashed ComfyUI with an unhandled exception whenever output/input/upload directories were on a different drive than the ComfyUI installation. Add folder_paths.is_path_within_directory() as a safe wrapper that catches ValueError and returns False (different drives means the path is clearly not inside the directory). Replace all bare os.path.commonpath security checks across server.py, folder_paths.py, and app/user_manager.py with this helper. In comfy/sd1_clip.py, narrow the bare except clause to except ValueError with a descriptive comment. Fixes #1488 |
||
|---|---|---|
| .. | ||
| assets | ||
| database | ||
| __init__.py | ||
| app_settings.py | ||
| custom_node_manager.py | ||
| frontend_management.py | ||
| logger.py | ||
| model_manager.py | ||
| node_replace_manager.py | ||
| subgraph_manager.py | ||
| user_manager.py | ||