diff options
| author | HTGAzureX1212. <39023054+HTGAzureX1212@users.noreply.github.com> | 2024-01-26 20:34:13 +0800 |
|---|---|---|
| committer | HTGAzureX1212. <39023054+HTGAzureX1212@users.noreply.github.com> | 2024-01-26 20:34:13 +0800 |
| commit | 2241d1618960a2d192b2874e925fa51afeb8a83b (patch) | |
| tree | 54f57d4f309e3381b18accc68b0c9daa2b20a755 | |
| parent | 8f89e57e9f7fe4a2fccf57161aea39a4e48b6a75 (diff) | |
| download | rust-2241d1618960a2d192b2874e925fa51afeb8a83b.tar.gz rust-2241d1618960a2d192b2874e925fa51afeb8a83b.zip | |
fix
| -rw-r--r-- | library/std/src/sys/pal/windows/fs.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/sys/pal/windows/fs.rs b/library/std/src/sys/pal/windows/fs.rs index b5976b87be2..38835db7649 100644 --- a/library/std/src/sys/pal/windows/fs.rs +++ b/library/std/src/sys/pal/windows/fs.rs @@ -1081,9 +1081,9 @@ pub fn readdir(p: &Path) -> io::Result<ReadDir> { // // See issue #120040: https://github.com/rust-lang/rust/issues/120040. let last_error = Error::last_os_error(); - if last_error.raw_os_error().unwrap() == c::ERROR_FILE_NOT_FOUND && p.exists() { + if last_error.raw_os_error().unwrap() == c::ERROR_FILE_NOT_FOUND as i32 && p.exists() { return Ok(ReadDir { - handle: FindNextFileHandle(file_handle), + handle: FindNextFileHandle(find_handle), root: Arc::new(root), first: None, }); |
