Skip to content

Commit 2241d16

Browse files
committed
fix
1 parent 8f89e57 commit 2241d16

File tree

1 file changed

+2
-2
lines changed
  • library/std/src/sys/pal/windows

1 file changed

+2
-2
lines changed

library/std/src/sys/pal/windows/fs.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1081,9 +1081,9 @@ pub fn readdir(p: &Path) -> io::Result<ReadDir> {
10811081
//
10821082
// See issue #120040: https://github.com/rust-lang/rust/issues/120040.
10831083
let last_error = Error::last_os_error();
1084-
if last_error.raw_os_error().unwrap() == c::ERROR_FILE_NOT_FOUND && p.exists() {
1084+
if last_error.raw_os_error().unwrap() == c::ERROR_FILE_NOT_FOUND as i32 && p.exists() {
10851085
return Ok(ReadDir {
1086-
handle: FindNextFileHandle(file_handle),
1086+
handle: FindNextFileHandle(find_handle),
10871087
root: Arc::new(root),
10881088
first: None,
10891089
});

0 commit comments

Comments
 (0)