1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 19:08:26 -06:00

Windows: Use periodic update of connected devices only if there is a Favorite that uses VolumeID. Add command option to disable the period update of devices.

This commit is contained in:
Mounir IDRASSI
2019-09-29 14:44:22 +02:00
parent 7d88577c61
commit 909255d55f
4 changed files with 106 additions and 60 deletions

View File

@@ -188,6 +188,9 @@ BOOL MountVolumesAsSystemFavorite = FALSE;
BOOL FavoriteMountOnArrivalInProgress = FALSE;
BOOL MultipleMountOperationInProgress = FALSE;
volatile BOOL NeedPeriodicDeviceListUpdate = FALSE;
BOOL DisablePeriodicDeviceListUpdate = FALSE;
BOOL WaitDialogDisplaying = FALSE;
/* Handle to the device driver */
@@ -12530,7 +12533,7 @@ wstring FindDeviceByVolumeID (const BYTE volumeID [VOLUME_ID_SIZE], BOOL bFromSe
/* not mounted. Look for it in the local drives*/
if (bFromService)
if (bFromService || !NeedPeriodicDeviceListUpdate)
{
for (int devNumber = 0; devNumber < MAX_HOST_DRIVE_NUMBER; devNumber++)
{