Skip to content

Commit 9844a8c

Browse files
client (Win): if dont_use_wsl is set, don't query for WSL
Apparently doing so can pop up an annoying alert
1 parent 6ca5db8 commit 9844a8c

1 file changed

Lines changed: 13 additions & 7 deletions

File tree

client/hostinfo_win.cpp

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1665,14 +1665,20 @@ int HOST_INFO::get_host_info(bool init) {
16651665
get_os_information(
16661666
os_name, sizeof(os_name), os_version, sizeof(os_version)
16671667
);
1668+
16681669
#ifdef _WIN64
1669-
OSVERSIONINFOEX osvi;
1670-
if (get_OSVERSIONINFO(osvi) && osvi.dwMajorVersion >= 10) {
1671-
retval = get_wsl_information(wsl_distros);
1672-
if (retval) {
1673-
msg_printf(0, MSG_INTERNAL_ERROR,
1674-
"get_wsl_information(): %s", boincerror(retval)
1675-
);
1670+
// apparently if WSL is not present, querying for it pops up an alert.
1671+
// Avoid this if WSL disabled in config
1672+
//
1673+
if (!cc_config.dont_use_wsl) {
1674+
OSVERSIONINFOEX osvi;
1675+
if (get_OSVERSIONINFO(osvi) && osvi.dwMajorVersion >= 10) {
1676+
retval = get_wsl_information(wsl_distros);
1677+
if (retval) {
1678+
msg_printf(0, MSG_INTERNAL_ERROR,
1679+
"get_wsl_information(): %s", boincerror(retval)
1680+
);
1681+
}
16761682
}
16771683
}
16781684
#endif

0 commit comments

Comments
 (0)