Closed
Description
I tried this code:
fn main() {
std::fs::create_dir_all("").unwrap();
}
The filename is invalid, so I've expected to see some error similar to posix utils:
$ mkdir -p ""
mkdir: cannot create directory ‘’: No such file or directory
$ mkdir ""
mkdir: cannot create directory ‘’: No such file or directory
Instead, nothing interesting happened, create_dir_all
succeeded.
Meta
$ rustc --version --verbose
rustc 1.67.0-nightly (e0098a5cc 2022-11-29)
binary: rustc
commit-hash: e0098a5cc3a87d857e597af824d0ce1ed1ad85e0
commit-date: 2022-11-29
host: x86_64-unknown-linux-gnu
release: 1.67.0-nightly
LLVM version: 15.0.4
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy