ComfyUI/app
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
..
assets feat(assets): align local API with cloud spec (#12863) 2026-03-16 12:34:04 -07:00
database feat(assets): align local API with cloud spec (#12863) 2026-03-16 12:34:04 -07:00
__init__.py Add FrontendManager to manage non-default front-end impl (#3897) 2024-07-16 11:26:11 -04:00
app_settings.py Update frontend to v1.25.10 and revert navigation mode override (#9522) 2025-08-23 17:54:01 -04:00
custom_node_manager.py This should not be a warning. (#7946) 2025-05-05 07:49:07 -04:00
frontend_management.py Move parsing of requirements logic to function. (#12701) 2026-02-28 22:21:32 -05:00
logger.py Repeat frontend version warning at the end. 2025-03-12 07:13:40 -04:00
model_manager.py New Year ruff cleanup. (#11595) 2026-01-01 22:06:14 -05:00
node_replace_manager.py Fix KeyError when prompt entries lack class_type key (#12595) 2026-02-24 16:02:05 -05:00
subgraph_manager.py fix: specify UTF-8 encoding when reading subgraph files (#12563) 2026-02-21 15:05:00 -08:00
user_manager.py fix: handle ValueError from os.path.commonpath on cross-drive paths (Windows) 2026-03-24 22:59:32 -04:00