[MSI] Revert to previous working solution for disk usage display in dialog.c (#5194)

There is a bug, which displays empty optical drive as a valid Drive where applications can be installed, which is wrong. This change will skip displaying any drives that are not fixed in the disk usage table in the msi installer UI.

JIRA issue: CORE-18758

Proposed changes

Revert to old solution from Doug Lyons which was working fine.
This commit is contained in:
Atharva Kulkarni 2023-04-02 22:46:18 +05:30 committed by GitHub
parent 1bdefebc9e
commit e13c3e856f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3206,7 +3206,11 @@ static void msi_dialog_vcl_add_drives( msi_dialog *dialog, msi_control *control
WCHAR cost_text[MAX_PATH];
LPWSTR drives, ptr;
LVITEMW lvitem;
#ifdef __REACTOS__
DWORD size;
#else
DWORD size, flags;
#endif
int i = 0;
cost = msi_vcl_get_cost(dialog);
@ -3223,8 +3227,12 @@ static void msi_dialog_vcl_add_drives( msi_dialog *dialog, msi_control *control
ptr = drives;
while (*ptr)
{
#ifdef __REACTOS__
if (GetDriveTypeW(ptr) != DRIVE_FIXED)
#else
if (GetVolumeInformationW(ptr, NULL, 0, NULL, 0, &flags, NULL, 0) &&
flags & FILE_READ_ONLY_VOLUME)
#endif
{
ptr += lstrlenW(ptr) + 1;
continue;