Skip to content

Commit fbdf6e8

Browse files
committed
chore: add windows cfg in read_dir, for use_native_path
1 parent 4fa8174 commit fbdf6e8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

library/std/src/sys/fs/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ pub use imp::{
6666
};
6767

6868
pub fn read_dir(path: &Path) -> io::Result<ReadDir> {
69+
#[cfg(not(windows))]
70+
return imp::remove_dir_all(path);
71+
#[cfg(windows)]
6972
with_native_path(path, &imp::readdir)
7073
}
7174

0 commit comments

Comments
 (0)