diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c index 0581d7ed..654d54c2 100644 --- a/src/Common/Dlgcode.c +++ b/src/Common/Dlgcode.c @@ -9827,7 +9827,7 @@ retry: removal before the process exits, leaving a ghost drive letter. Re-send the notification with SHCNF_FLUSH to force synchronous processing by Explorer before we return. */ - if (Silent) + if (Silent && !DeviceChangeBroadcastDisabled) { wchar_t root[] = { (wchar_t) (nDosDriveNo + L'A'), L':', L'\\', 0 }; SHChangeNotify (SHCNE_DRIVEREMOVED, SHCNF_PATH | SHCNF_FLUSH, root, NULL); diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c index 31b7157a..565ef859 100644 --- a/src/Mount/Mount.c +++ b/src/Mount/Mount.c @@ -6350,7 +6350,7 @@ retry: /* GH #337, GH #1426: Flush shell notifications synchronously in silent/CLI mode to prevent ghost drive letters when the process exits immediately after dismount. */ - if (Silent) + if (Silent && !DeviceChangeBroadcastDisabled) { DWORD removedDrives = prevMountList.ulMountedDrives & ~mountList.ulMountedDrives; for (i = 0; i < 26; i++)