[SHELL32] Fix starting disk cleanup from drive properties

CORE-12314
This commit is contained in:
Mark Jansen
2025-03-27 10:55:41 +01:00
parent 97e7efc020
commit 70422cda51
+6 -1
View File
@@ -553,8 +553,13 @@ CDrvDefExt::GeneralPageProc(
WCHAR wszCmd[MAX_PATH];
StringCbPrintfW(wszCmd, sizeof(wszCmd), wszBuf, pDrvDefExt->m_wszDrive[0]);
WCHAR* wszArgs = PathGetArgsW(wszCmd);
if (wszArgs && *wszArgs && wszArgs != wszCmd)
wszArgs[-1] = UNICODE_NULL;
else
wszArgs = NULL;
if (ShellExecuteW(hwndDlg, NULL, wszCmd, NULL, NULL, SW_SHOW) <= (HINSTANCE)32)
if (ShellExecuteW(hwndDlg, NULL, wszCmd, wszArgs, NULL, SW_SHOW) <= (HINSTANCE)32)
ERR("Failed to create cleanup process %ls\n", wszCmd);
}
}