summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDavid Lönnhager <david.l@mullvad.net>2025-10-07 17:02:50 +0200
committerDavid Lönnhager <david.l@mullvad.net>2025-10-08 10:08:11 +0200
commit19659613623b14b26bb45535bab8f03248ae5032 (patch)
treef71fe002439705bc408c795805d2e8e7f84f3157
parent205a534561d6fe633c7aeff05d6bc43fc57fd1b4 (diff)
downloadmullvadvpn-19659613623b14b26bb45535bab8f03248ae5032.tar.xz
mullvadvpn-19659613623b14b26bb45535bab8f03248ae5032.zip
Remove fallback for checking Windows version
It may be that this check fails for whatever reason, but the old method does not always return the correct version
-rw-r--r--mullvad-nsis/src/lib.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/mullvad-nsis/src/lib.rs b/mullvad-nsis/src/lib.rs
index 6bb7472eff..354677eee1 100644
--- a/mullvad-nsis/src/lib.rs
+++ b/mullvad-nsis/src/lib.rs
@@ -153,15 +153,13 @@ pub struct WindowsVer {
/// Write OS version into `version_out` when `Status::Ok` is returned.
///
/// # Safety
-/// `version_out` should point to a valid `WindowsVer`
+/// `version_out` must point to a valid `WindowsVer`
#[unsafe(no_mangle)]
pub unsafe extern "C" fn get_system_version_struct(version_out: *mut WindowsVer) -> Status {
use talpid_platform_metadata::WindowsVersion;
catch_and_log_unwind(|| {
- // Try to retrieve the version based on the kernel image. Use normal method as fallback.
- let winver = WindowsVersion::from_ntoskrnl()
- .or_else(|_| WindowsVersion::new())
- .unwrap();
+ // Try to retrieve the version based on the kernel image
+ let winver = WindowsVersion::from_ntoskrnl().unwrap();
let c_ver = WindowsVer {
major_version: winver.major_version(),
minor_version: winver.minor_version(),