diff --git a/Cargo.lock b/Cargo.lock index 8bd76de7..67d08a5e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -299,7 +299,7 @@ dependencies = [ "libc", "option-ext", "redox_users", - "windows-sys", + "windows-sys 0.59.0", ] [[package]] @@ -354,7 +354,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "976dd42dc7e85965fe702eb8164f21f450704bdde31faefd6471dba214cb594e" dependencies = [ "libc", - "windows-sys", + "windows-sys 0.59.0", ] [[package]] @@ -497,7 +497,7 @@ dependencies = [ "regex", "rust-ini", "unicase", - "windows 0.61.3", + "windows", ] [[package]] @@ -517,7 +517,7 @@ dependencies = [ "saphyr", "tempfile", "unicase", - "windows 0.62.0", + "windows-sys 0.61.1", ] [[package]] @@ -976,7 +976,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys", + "windows-sys 0.59.0", ] [[package]] @@ -1079,7 +1079,7 @@ dependencies = [ "getrandom 0.3.2", "once_cell", "rustix", - "windows-sys", + "windows-sys 0.59.0", ] [[package]] @@ -1199,7 +1199,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys", + "windows-sys 0.59.0", ] [[package]] @@ -1214,24 +1214,11 @@ version = "0.61.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" dependencies = [ - "windows-collections 0.2.0", - "windows-core 0.61.2", - "windows-future 0.2.1", + "windows-collections", + "windows-core", + "windows-future", "windows-link 0.1.3", - "windows-numerics 0.2.0", -] - -[[package]] -name = "windows" -version = "0.62.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9579d0e6970fd5250aa29aba5994052385ff55cf7b28a059e484bb79ea842e42" -dependencies = [ - "windows-collections 0.3.0", - "windows-core 0.62.0", - "windows-future 0.3.0", - "windows-link 0.2.0", - "windows-numerics 0.3.0", + "windows-numerics", ] [[package]] @@ -1240,16 +1227,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" dependencies = [ - "windows-core 0.61.2", -] - -[[package]] -name = "windows-collections" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a90dd7a7b86859ec4cdf864658b311545ef19dbcf17a672b52ab7cefe80c336f" -dependencies = [ - "windows-core 0.62.0", + "windows-core", ] [[package]] @@ -1261,21 +1239,8 @@ dependencies = [ "windows-implement", "windows-interface", "windows-link 0.1.3", - "windows-result 0.3.4", - "windows-strings 0.4.2", -] - -[[package]] -name = "windows-core" -version = "0.62.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57fe7168f7de578d2d8a05b07fd61870d2e73b4020e9f49aa00da8471723497c" -dependencies = [ - "windows-implement", - "windows-interface", - "windows-link 0.2.0", - "windows-result 0.4.0", - "windows-strings 0.5.0", + "windows-result", + "windows-strings", ] [[package]] @@ -1284,20 +1249,9 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" dependencies = [ - "windows-core 0.61.2", + "windows-core", "windows-link 0.1.3", - "windows-threading 0.1.0", -] - -[[package]] -name = "windows-future" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2194dee901458cb79e1148a4e9aac2b164cc95fa431891e7b296ff0b2f1d8a6" -dependencies = [ - "windows-core 0.62.0", - "windows-link 0.2.0", - "windows-threading 0.2.0", + "windows-threading", ] [[package]] @@ -1340,20 +1294,10 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" dependencies = [ - "windows-core 0.61.2", + "windows-core", "windows-link 0.1.3", ] -[[package]] -name = "windows-numerics" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ce3498fe0aba81e62e477408383196b4b0363db5e0c27646f932676283b43d8" -dependencies = [ - "windows-core 0.62.0", - "windows-link 0.2.0", -] - [[package]] name = "windows-result" version = "0.3.4" @@ -1363,15 +1307,6 @@ dependencies = [ "windows-link 0.1.3", ] -[[package]] -name = "windows-result" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7084dcc306f89883455a206237404d3eaf961e5bd7e0f312f7c91f57eb44167f" -dependencies = [ - "windows-link 0.2.0", -] - [[package]] name = "windows-strings" version = "0.4.2" @@ -1381,15 +1316,6 @@ dependencies = [ "windows-link 0.1.3", ] -[[package]] -name = "windows-strings" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7218c655a553b0bed4426cf54b20d7ba363ef543b52d515b3e48d7fd55318dda" -dependencies = [ - "windows-link 0.2.0", -] - [[package]] name = "windows-sys" version = "0.59.0" @@ -1399,6 +1325,15 @@ dependencies = [ "windows-targets", ] +[[package]] +name = "windows-sys" +version = "0.61.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f109e41dd4a3c848907eb83d5a42ea98b3769495597450cf6d153507b166f0f" +dependencies = [ + "windows-link 0.2.0", +] + [[package]] name = "windows-targets" version = "0.52.6" @@ -1424,15 +1359,6 @@ dependencies = [ "windows-link 0.1.3", ] -[[package]] -name = "windows-threading" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab47f085ad6932defa48855254c758cdd0e2f2d48e62a34118a268d8f345e118" -dependencies = [ - "windows-link 0.2.0", -] - [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" diff --git a/Cargo.toml b/Cargo.toml index 4fdd716c..f15d2375 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,7 @@ saphyr = "0.0.6" unicase = "2.8.1" [target.'cfg(windows)'.dependencies] -windows = { version = "0.62.0", features = ["Win32_Storage_FileSystem"] } +windows-sys = { version = "0.61.0", features = ["Win32_Storage_FileSystem"] } [dev-dependencies] array-parameterized-test = { path = "./array-parameterized-test", version = "1.0.0" } diff --git a/src/archive/find.rs b/src/archive/find.rs index ad48ee4d..c9257ffe 100644 --- a/src/archive/find.rs +++ b/src/archive/find.rs @@ -4,7 +4,7 @@ use std::{ }; #[cfg(windows)] -use windows::Win32::Storage::FileSystem::BY_HANDLE_FILE_INFORMATION; +use windows_sys::Win32::Storage::FileSystem::BY_HANDLE_FILE_INFORMATION; use crate::{GameType, game::GameCache, plugin::has_ascii_extension}; @@ -140,7 +140,7 @@ fn are_file_paths_equivalent(lhs: &Path, rhs: &Path) -> bool { #[cfg(windows)] fn get_file_info(file_path: &Path) -> Option { use std::os::windows::io::AsRawHandle; - use windows::Win32::{Foundation::HANDLE, Storage::FileSystem::GetFileInformationByHandle}; + use windows_sys::Win32::Storage::FileSystem::GetFileInformationByHandle; let Ok(file) = std::fs::File::open(file_path) else { return None; @@ -153,9 +153,9 @@ fn get_file_info(file_path: &Path) -> Option { unsafe_code, reason = "There is currently no way to get this data safely" )] - unsafe { GetFileInformationByHandle(HANDLE(file.as_raw_handle()), &raw mut info) } - .is_ok() - .then_some(info) + let result = unsafe { GetFileInformationByHandle(file.as_raw_handle(), &raw mut info) }; + + (result != 0).then_some(info) } #[cfg(not(windows))] diff --git a/supply-chain/imports.lock b/supply-chain/imports.lock index 5049e944..e902bce8 100644 --- a/supply-chain/imports.lock +++ b/supply-chain/imports.lock @@ -29,13 +29,6 @@ user-id = 64539 user-login = "kennykerr" user-name = "Kenny Kerr" -[[publisher.windows]] -version = "0.62.0" -when = "2025-09-04" -user-id = 64539 -user-login = "kennykerr" -user-name = "Kenny Kerr" - [[publisher.windows-collections]] version = "0.2.0" when = "2025-03-18" @@ -43,13 +36,6 @@ user-id = 64539 user-login = "kennykerr" user-name = "Kenny Kerr" -[[publisher.windows-collections]] -version = "0.3.0" -when = "2025-09-04" -user-id = 64539 -user-login = "kennykerr" -user-name = "Kenny Kerr" - [[publisher.windows-core]] version = "0.61.2" when = "2025-05-19" @@ -57,13 +43,6 @@ user-id = 64539 user-login = "kennykerr" user-name = "Kenny Kerr" -[[publisher.windows-core]] -version = "0.62.0" -when = "2025-09-04" -user-id = 64539 -user-login = "kennykerr" -user-name = "Kenny Kerr" - [[publisher.windows-future]] version = "0.2.1" when = "2025-05-15" @@ -71,13 +50,6 @@ user-id = 64539 user-login = "kennykerr" user-name = "Kenny Kerr" -[[publisher.windows-future]] -version = "0.3.0" -when = "2025-09-04" -user-id = 64539 -user-login = "kennykerr" -user-name = "Kenny Kerr" - [[publisher.windows-implement]] version = "0.60.0" when = "2025-03-18" @@ -113,13 +85,6 @@ user-id = 64539 user-login = "kennykerr" user-name = "Kenny Kerr" -[[publisher.windows-numerics]] -version = "0.3.0" -when = "2025-09-04" -user-id = 64539 -user-login = "kennykerr" -user-name = "Kenny Kerr" - [[publisher.windows-result]] version = "0.3.4" when = "2025-05-19" @@ -127,13 +92,6 @@ user-id = 64539 user-login = "kennykerr" user-name = "Kenny Kerr" -[[publisher.windows-result]] -version = "0.4.0" -when = "2025-09-04" -user-id = 64539 -user-login = "kennykerr" -user-name = "Kenny Kerr" - [[publisher.windows-strings]] version = "0.4.2" when = "2025-05-19" @@ -141,16 +99,16 @@ user-id = 64539 user-login = "kennykerr" user-name = "Kenny Kerr" -[[publisher.windows-strings]] -version = "0.5.0" -when = "2025-09-04" +[[publisher.windows-sys]] +version = "0.59.0" +when = "2024-07-30" user-id = 64539 user-login = "kennykerr" user-name = "Kenny Kerr" [[publisher.windows-sys]] -version = "0.59.0" -when = "2024-07-30" +version = "0.61.1" +when = "2025-09-25" user-id = 64539 user-login = "kennykerr" user-name = "Kenny Kerr" @@ -169,13 +127,6 @@ user-id = 64539 user-login = "kennykerr" user-name = "Kenny Kerr" -[[publisher.windows-threading]] -version = "0.2.0" -when = "2025-09-04" -user-id = 64539 -user-login = "kennykerr" -user-name = "Kenny Kerr" - [[publisher.windows_aarch64_gnullvm]] version = "0.52.6" when = "2024-07-03"