Skip to content

mkdir on nonexistent parent returns wrong error #1595

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mkroening opened this issue Feb 11, 2025 · 1 comment
Open

mkdir on nonexistent parent returns wrong error #1595

mkroening opened this issue Feb 11, 2025 · 1 comment
Assignees

Comments

@mkroening
Copy link
Member

mkroening commented Feb 11, 2025

mkdir should return ENOENT if

A component of the path prefix of path does not name an existing file or path is an empty string.

Currently, mkdir("/a/b") returns EBADF instead of ENOENT if /a does not exist.

This is required for std::fs::create_dir_all to work.

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

No branches or pull requests

3 participants