fix
This commit is contained in:
parent
8f89e57e9f
commit
2241d16189
@ -1081,9 +1081,9 @@ pub fn readdir(p: &Path) -> io::Result<ReadDir> {
|
|||||||
//
|
//
|
||||||
// See issue #120040: https://github.com/rust-lang/rust/issues/120040.
|
// See issue #120040: https://github.com/rust-lang/rust/issues/120040.
|
||||||
let last_error = Error::last_os_error();
|
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 {
|
return Ok(ReadDir {
|
||||||
handle: FindNextFileHandle(file_handle),
|
handle: FindNextFileHandle(find_handle),
|
||||||
root: Arc::new(root),
|
root: Arc::new(root),
|
||||||
first: None,
|
first: None,
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user