ComfyUI/tests-unit/comfy_test
Krishna Chaitanya Balusu 40a25de926 fix: handle ValueError from os.path.commonpath on cross-drive paths (Windows)
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
2026-03-24 22:59:32 -04:00
..
folder_path_test.py fix: handle ValueError from os.path.commonpath on cross-drive paths (Windows) 2026-03-24 22:59:32 -04:00
model_detection_test.py Native LongCat-Image implementation (#12597) 2026-02-27 23:04:34 -05:00