Commit 0dd0d879 authored by Pierre Schweitzer's avatar Pierre Schweitzer Committed by Alexandre Julliard

msi: Don't consider read-only drives when enumerating volumes.

parent 84e6b331
......@@ -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,6 +3306,13 @@ static void msi_dialog_vcl_add_drives( msi_dialog *dialog, msi_control *control
ptr = drives;
while (*ptr)
{
if (GetVolumeInformationW(ptr, NULL, 0, NULL, 0, &flags, NULL, 0) &&
flags & FILE_READ_ONLY_VOLUME)
{
ptr += lstrlenW(ptr) + 1;
continue;
}
lvitem.mask = LVIF_TEXT;
lvitem.iItem = i;
lvitem.iSubItem = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment