From 720ca0ef0097d4a545a9603c1704fa0797a1b8fe Mon Sep 17 00:00:00 2001 From: Niyaz Nigmatullin Date: Fri, 21 Oct 2022 13:48:36 +0300 Subject: [PATCH] Update `windows-sys` to `0.42.0` (#47) * Update windows-sys requirement from 0.36.0 to 0.42.0 Updates the requirements on [windows-sys](https://github.com/microsoft/windows-rs) to permit the latest version. - [Release notes](https://github.com/microsoft/windows-rs/releases) - [Commits](https://github.com/microsoft/windows-rs/compare/0.36.0...0.42.0) --- updated-dependencies: - dependency-name: windows-sys dependency-type: direct:production ... Signed-off-by: dependabot[bot] * Fix `windows-sys` usage for an update to 0.42.0 Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.toml | 2 +- src/fs.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ab3c307..c8cab38 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,7 +33,7 @@ num_cpus = { version = "1.13", optional = true } rayon = { version = "1.4", optional = true } [target.'cfg(windows)'.dependencies.windows-sys] -version = "0.36.0" +version = "0.42.0" features = [ "Win32_Foundation", "Win32_Storage_FileSystem", diff --git a/src/fs.rs b/src/fs.rs index 239f5b1..219ebf1 100644 --- a/src/fs.rs +++ b/src/fs.rs @@ -9,7 +9,6 @@ use std::{ #[cfg(feature = "parallel")] use rayon::prelude::*; -use windows_sys::Win32::System::SystemServices::*; use windows_sys::Win32::Storage::FileSystem::*; use windows_sys::Win32::Foundation::HANDLE; @@ -145,7 +144,7 @@ fn delete_readonly(metadata: fs::Metadata, path: &Path) -> io::Result<()> { file.set_permissions(perms)?; let mut info = FILE_DISPOSITION_INFO { - DeleteFileA: true as u8, + DeleteFile: true as u8, }; let result = unsafe { SetFileInformationByHandle(