From a90f19dbe340667fccef5e886733da824ef990b1 Mon Sep 17 00:00:00 2001 From: Bill Zissimopoulos Date: Fri, 3 Jun 2022 12:10:54 +0100 Subject: [PATCH] dll: FspMountBroadcastDriveChange: fix drive change unitmask --- src/dll/mount.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/dll/mount.c b/src/dll/mount.c index 965a58d9..3dda79ea 100644 --- a/src/dll/mount.c +++ b/src/dll/mount.c @@ -407,7 +407,7 @@ static VOID FspMountBroadcastDriveChange(PWSTR MountPoint, WPARAM WParam) BOOLEAN IsLocalSystem; DEV_BROADCAST_VOLUME DriveChange; - DWORD Flags, Recipients; + DWORD Recipients; FspServiceContextCheck(0, &IsLocalSystem); @@ -415,12 +415,11 @@ static VOID FspMountBroadcastDriveChange(PWSTR MountPoint, WPARAM WParam) DriveChange.dbcv_size = sizeof DriveChange; DriveChange.dbcv_devicetype = DBT_DEVTYP_VOLUME; DriveChange.dbcv_flags = DBTF_NET; - DriveChange.dbcv_unitmask = 1 << (MountPoint[0] - 'a'); + DriveChange.dbcv_unitmask = 1 << ((MountPoint[0] | 0x20) - 'a'); - Flags = BSF_POSTMESSAGE; Recipients = BSM_APPLICATIONS | (IsLocalSystem ? BSM_ALLDESKTOPS : 0); BroadcastSystemMessageW( - Flags, + BSF_POSTMESSAGE, &Recipients, WM_DEVICECHANGE, WParam,