diff --git a/Cargo.toml b/Cargo.toml index c71c2fe..26baf22 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,9 +23,11 @@ members = ["walkdir-list"] [dependencies] same-file = "1.0.1" -[target.'cfg(windows)'.dependencies.winapi] -version = "0.3" -features = ["std", "winnt"] +[target.'cfg(windows)'.dependencies.windows-sys] +version = "0.36.0" +features = [ + "Win32_Storage_FileSystem", +] [target.'cfg(windows)'.dependencies.winapi-util] version = "0.1.1" diff --git a/src/dent.rs b/src/dent.rs index a28ed3d..5bb36a7 100644 --- a/src/dent.rs +++ b/src/dent.rs @@ -183,7 +183,7 @@ impl DirEntry { #[cfg(windows)] pub(crate) fn is_dir(&self) -> bool { use std::os::windows::fs::MetadataExt; - use winapi::um::winnt::FILE_ATTRIBUTE_DIRECTORY; + use windows_sys::Win32::Storage::FileSystem::FILE_ATTRIBUTE_DIRECTORY; self.metadata.file_attributes() & FILE_ATTRIBUTE_DIRECTORY != 0 }