mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-04-15 13:02:35 +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 |
||
|---|---|---|
| .. | ||
| folder_path_test.py | ||
| model_detection_test.py | ||