Closed
Description
The doc for canonicalize state that the function will return an error if a component in a path is not a directory.
Using canonicalize on a path with a file component does not return an error for me, e.g.
fs::canonicalize("./src/../Cargo.toml").unwrap();
works without error.
Meta
rustc 1.28.0 (9634041 2018-07-30)
binary: rustc
commit-hash: 9634041
commit-date: 2018-07-30
host: x86_64-apple-darwin
release: 1.28.0
LLVM version: 6.0