From 182a2d623e408c6857ac1ce10157a665b8a5823c Mon Sep 17 00:00:00 2001 From: winesync Date: Sun, 13 Mar 2022 00:14:01 +0100 Subject: [PATCH] [WINESYNC] msi: Don't consider read-only drives when enumerating volumes. Signed-off-by: Pierre Schweitzer Signed-off-by: Hans Leidekker Signed-off-by: Alexandre Julliard wine commit id 0dd0d879a1c487dcefedd44762d4ea0fcebd98fe by Pierre Schweitzer --- dll/win32/msi/dialog.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dll/win32/msi/dialog.c b/dll/win32/msi/dialog.c index 29e016d9f7b..c09d3d1c695 100644 --- a/dll/win32/msi/dialog.c +++ b/dll/win32/msi/dialog.c @@ -3289,7 +3289,7 @@ static void msi_dialog_vcl_add_drives( msi_dialog *dialog, msi_control *control WCHAR cost_text[MAX_PATH]; LPWSTR drives, ptr; LVITEMW lvitem; - DWORD size; + DWORD size, flags; int i = 0; cost = msi_vcl_get_cost(dialog); @@ -3306,13 +3306,13 @@ static void msi_dialog_vcl_add_drives( msi_dialog *dialog, msi_control *control ptr = drives; while (*ptr) { -#ifdef __REACTOS__ - if (GetDriveTypeW(ptr) != DRIVE_FIXED) + if (GetVolumeInformationW(ptr, NULL, 0, NULL, 0, &flags, NULL, 0) && + flags & FILE_READ_ONLY_VOLUME) { ptr += lstrlenW(ptr) + 1; continue; } -#endif + lvitem.mask = LVIF_TEXT; lvitem.iItem = i; lvitem.iSubItem = 0;