mkdir on nonexistent parent returns wrong error
Open
- Dominant language
- Rust
- Stars
- 1.5k
- Forks
- 132
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 39
Description
[mkdir](https://pubs.opengroup.org/onlinepubs/9799919799/functions/mkdir.html) 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`](https://doc.rust-lang.org/stable/std/fs/fn.create_dir_all.html) to work.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.