VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Mount/Mount.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2017-07-27 00:15:16 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2017-07-27 00:30:54 +0200
commitaaa9a08bd48d73c6e17aa00a3fff883a2c3a716b (patch)
treee6c45d0b9b97a92dcf53e55c4e04455f5df35f85 /src/Mount/Mount.c
parent72b7147021a18ea6a045514fa7cad7772c4bb811 (diff)
downloadVeraCrypt-aaa9a08bd48d73c6e17aa00a3fff883a2c3a716b.tar.gz
VeraCrypt-aaa9a08bd48d73c6e17aa00a3fff883a2c3a716b.zip
Windows: when mounting system favorites using VolumeID feature, query all disks each time instead of caching previous call results. This is not efficient but it should fix rare cases where issues happen.
Diffstat (limited to 'src/Mount/Mount.c')
-rw-r--r--src/Mount/Mount.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c
index ec612a16..4333bb65 100644
--- a/src/Mount/Mount.c
+++ b/src/Mount/Mount.c
@@ -495,7 +495,7 @@ static void InitMainDialog (HWND hwndDlg)
}
// initialize the list of devices available for mounting as early as possible
- UpdateMountableHostDeviceList (false);
+ UpdateMountableHostDeviceList ();
// Resize the logo bitmap if the user has a non-default DPI
if (ScreenDPI != USER_DEFAULT_SCREEN_DPI
@@ -7119,7 +7119,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
{
if (wParam == TIMER_ID_UPDATE_DEVICE_LIST)
{
- UpdateMountableHostDeviceList (false);
+ UpdateMountableHostDeviceList ();
}
else
{
@@ -7195,7 +7195,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
if (IsMountedVolumeID (favorite.VolumeID))
continue;
- std::wstring volDevPath = FindDeviceByVolumeID (favorite.VolumeID);
+ std::wstring volDevPath = FindDeviceByVolumeID (favorite.VolumeID, FALSE);
if (volDevPath.length() > 0)
{
favorite.Path = volDevPath;
@@ -8486,7 +8486,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
std::wstring volName;
WaitCursor();
if (FavoriteVolumes[favoriteIndex].UseVolumeID)
- volName = FindDeviceByVolumeID (FavoriteVolumes[favoriteIndex].VolumeID);
+ volName = FindDeviceByVolumeID (FavoriteVolumes[favoriteIndex].VolumeID, FALSE);
else
volName = FavoriteVolumes[favoriteIndex].Path;
OpenVolumeExplorerWindow (GetMountedVolumeDriveNo ((wchar_t*) FavoriteVolumes[favoriteIndex].Path.c_str()));
@@ -9172,7 +9172,7 @@ static VOID WINAPI SystemFavoritesServiceMain (DWORD argc, LPTSTR *argv)
SystemFavoritesServiceLogInfo (wstring (L"Initializing list of host devices"));
// initialize the list of devices available for mounting as early as possible
- UpdateMountableHostDeviceList (true);
+ UpdateMountableHostDeviceList ();
SystemFavoritesServiceLogInfo (wstring (L"Starting System Favorites mounting process"));
@@ -9479,7 +9479,7 @@ static BOOL MountFavoriteVolumeBase (HWND hwnd, const FavoriteVolume &favorite,
if (favorite.UseVolumeID && !IsRepeatedByteArray (0, favorite.VolumeID, sizeof (favorite.VolumeID)))
{
- effectiveVolumePath = FindDeviceByVolumeID (favorite.VolumeID);
+ effectiveVolumePath = FindDeviceByVolumeID (favorite.VolumeID, (ServiceMode && systemFavorites)? TRUE : FALSE);
}
else
effectiveVolumePath = favorite.Path;
@@ -9645,7 +9645,7 @@ BOOL MountFavoriteVolumes (HWND hwnd, BOOL systemFavorites, BOOL logOnMount, BOO
{
if (favorite->UseVolumeID)
{
- std::wstring path = FindDeviceByVolumeID (favorite->VolumeID);
+ std::wstring path = FindDeviceByVolumeID (favorite->VolumeID, TRUE);
if (path.empty ())
{
favorite->DisconnectedDevice = true;
@@ -9706,7 +9706,7 @@ BOOL MountFavoriteVolumes (HWND hwnd, BOOL systemFavorites, BOOL logOnMount, BOO
Sleep (5000);
SystemFavoritesServiceLogInfo (wstring (L"Updating list of host devices"));
- UpdateMountableHostDeviceList (true);
+ UpdateMountableHostDeviceList ();
SystemFavoritesServiceLogInfo (wstring (L"Trying to mount skipped system favorites"));
@@ -9723,7 +9723,7 @@ BOOL MountFavoriteVolumes (HWND hwnd, BOOL systemFavorites, BOOL logOnMount, BOO
wstring resolvedPath;
if (favorite->UseVolumeID)
{
- resolvedPath = FindDeviceByVolumeID (favorite->VolumeID);
+ resolvedPath = FindDeviceByVolumeID (favorite->VolumeID, TRUE);
}
else
resolvedPath = VolumeGuidPathToDevicePath (favorite->Path);