ComfyUI
ComfyUI copied to clipboard
Fix: filter hidden files from /internal/files endpoint
Summary
Filter out hidden files (e.g., .DS_Store on macOS) from the /internal/files/{directory_type} endpoint response.
This fixes an issue where the LoadImageOutput node would fail to load an image on macOS because .DS_Store was returned as the first file in the output directory.
Background
This fix was originally attempted in the frontend repo (https://github.com/Comfy-Org/ComfyUI_frontend/pull/7200), but filtering at the API level is the cleaner solution since it prevents invalid files from being returned to any client.
Test plan
- On macOS with
.DS_Storein the output folder, verify the file is no longer returned by/internal/files/output - Verify normal image/video files are still returned correctly