Skip to content

Skip non-file entries when scanning for event files (fixes #152) - #153

Open
CarloLucibello wants to merge 1 commit into
JuliaLogging:masterfrom
CarloLucibello:cl/skip-non-files
Open

Skip non-file entries when scanning for event files (fixes #152)#153
CarloLucibello wants to merge 1 commit into
JuliaLogging:masterfrom
CarloLucibello:cl/skip-non-files

Conversation

@CarloLucibello

Copy link
Copy Markdown
Contributor

Fixes #152.

TBEventFileCollectionIterator opened every entry returned by readdir, including subdirectories. Opening a directory throws a "Permission denied" error on Windows, which crashes map_summaries / log reading whenever a sibling folder (e.g. a checkpoints/ directory) coexists with the event files in the log directory. On Linux/macOS open on a directory happens to succeed, masking the problem.

This adds an isfile guard before the open call so subdirectories and other non-file entries are skipped consistently across platforms.

A subdirectory is now created in the deserialization test to cover the scenario.

🤖 Generated with Claude Code

`TBEventFileCollectionIterator` opened every entry returned by `readdir`,
including subdirectories. Opening a directory throws "Permission denied"
on Windows, crashing `map_summaries`/log reading whenever a sibling
folder (e.g. `checkpoints/`) coexists with the event files. Guard the
`open` call with `isfile` so subdirectories are skipped on all platforms.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TBEventFileCollectionIterator opens every dir entry, crashing on Windows when logdir contains subdirectories

1 participant