diff options
| author | Yuki Okushi <yuki.okushi@huawei.com> | 2021-11-16 14:36:20 +0900 |
|---|---|---|
| committer | Yuki Okushi <yuki.okushi@huawei.com> | 2021-11-17 03:11:14 +0900 |
| commit | ddc1d58ca83ab2c176929c47bd679cfbe8cf32f9 (patch) | |
| tree | cfecfff5a6b3a0cbb73c78f8c176c3da4b15852d /library/std/src/fs/tests.rs | |
| parent | b0535508474fb4353a3b83ef79df87817f028a71 (diff) | |
| download | rust-ddc1d58ca83ab2c176929c47bd679cfbe8cf32f9.tar.gz rust-ddc1d58ca83ab2c176929c47bd679cfbe8cf32f9.zip | |
windows: Return the "Not Found" error when a path is empty
Diffstat (limited to 'library/std/src/fs/tests.rs')
| -rw-r--r-- | library/std/src/fs/tests.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/library/std/src/fs/tests.rs b/library/std/src/fs/tests.rs index 628de13156c..112b292e6c1 100644 --- a/library/std/src/fs/tests.rs +++ b/library/std/src/fs/tests.rs @@ -1439,4 +1439,8 @@ fn create_dir_long_paths() { // This will fail if the path isn't converted to verbatim. path.push("a"); fs::create_dir(&path).unwrap(); + + // #90940: Ensure an empty path returns the "Not Found" error. + let path = Path::new(""); + assert_eq!(path.canonicalize().unwrap_err().kind(), crate::io::ErrorKind::NotFound); } |
