ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

Fix: filter hidden files from /internal/files endpoint

Open Myestery opened this issue 1 month ago • 0 comments

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_Store in the output folder, verify the file is no longer returned by /internal/files/output
  • Verify normal image/video files are still returned correctly

Myestery avatar Dec 08 '25 18:12 Myestery