https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e13c3e856f82faa0d0990…
commit e13c3e856f82faa0d09905b57f17efec73e0abdd
Author: Atharva Kulkarni <atharvak1910(a)gmail.com>
AuthorDate: Sun Apr 2 22:46:18 2023 +0530
Commit: GitHub <noreply(a)github.com>
CommitDate: Sun Apr 2 19:16:18 2023 +0200
[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.
---
dll/win32/msi/dialog.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/dll/win32/msi/dialog.c b/dll/win32/msi/dialog.c
index 8e4c1511081..1bea93dc081 100644
--- a/dll/win32/msi/dialog.c
+++ b/dll/win32/msi/dialog.c
@@ -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;