Skip to content

Ignore empty entries in SSL_CERT_DIR#242

Merged
djc merged 1 commit into
rustls:mainfrom
sliekens:fix/ignore-empty-ssl-cert-dir-entries
Jun 1, 2026
Merged

Ignore empty entries in SSL_CERT_DIR#242
djc merged 1 commit into
rustls:mainfrom
sliekens:fix/ignore-empty-ssl-cert-dir-entries

Conversation

@sliekens

Copy link
Copy Markdown
Contributor

A leading or trailing separator (e.g. :/etc/ssl/certs) produces an empty path component via env::split_paths, which then causes a spurious ENOENT warning when fs::read_dir("") is called. Filter out empty components before collecting so they are silently skipped.

Fixes #241

@cpu

This comment has been minimized.

@sliekens sliekens force-pushed the fix/ignore-empty-ssl-cert-dir-entries branch from a217f48 to d4a4bd6 Compare May 29, 2026 16:47
Comment thread src/lib.rs Outdated
Comment thread src/lib.rs Outdated
@sliekens sliekens force-pushed the fix/ignore-empty-ssl-cert-dir-entries branch 3 times, most recently from 38a771c to a217f48 Compare May 30, 2026 16:14
A leading or trailing separator (e.g. `:/etc/ssl/certs`) produces an
empty path component via `env::split_paths`, which then causes a
spurious ENOENT warning when `fs::read_dir("")` is called. Filter out
empty components before collecting so they are silently skipped.

Fixes rustls#241

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sliekens sliekens force-pushed the fix/ignore-empty-ssl-cert-dir-entries branch from a217f48 to 1a51788 Compare May 30, 2026 16:14

@cpu cpu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@djc djc added this pull request to the merge queue Jun 1, 2026
Merged via the queue into rustls:main with commit 26d43e3 Jun 1, 2026
14 checks passed
@djc djc mentioned this pull request Jun 1, 2026
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.

Ignore empty entries in SSL_CERT_DIR instead of logging ENOENT for ''

4 participants