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:
@@ -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++)
|
||||
{
|
||||
|
||||
@@ -165,6 +165,9 @@ extern BOOL MountVolumesAsSystemFavorite;
|
||||
extern BOOL FavoriteMountOnArrivalInProgress;
|
||||
extern BOOL MultipleMountOperationInProgress;
|
||||
|
||||
extern volatile BOOL NeedPeriodicDeviceListUpdate;
|
||||
extern BOOL DisablePeriodicDeviceListUpdate;
|
||||
|
||||
#ifndef SETUP
|
||||
extern BOOL bLanguageSetInSetup;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user