mirror of
https://github.com/veracrypt/VeraCrypt
synced 2024-11-28 05:53:29 +01:00
Windows: Save/Restore last selected drive in drivers list only when saving history is enabled.
This commit is contained in:
parent
42a7a17cb9
commit
e445863ae4
@ -723,7 +723,7 @@ void LoadSettingsAndCheckModified (HWND hwndDlg, BOOL bOnlyCheckModified, BOOL*
|
|||||||
ConfigReadCompareInt ("HiddenSystemLeakProtNotifStatus", TC_HIDDEN_OS_READ_ONLY_NOTIF_MODE_NONE, &HiddenSysLeakProtectionNotificationStatus, bOnlyCheckModified, pbSettingsModified);
|
ConfigReadCompareInt ("HiddenSystemLeakProtNotifStatus", TC_HIDDEN_OS_READ_ONLY_NOTIF_MODE_NONE, &HiddenSysLeakProtectionNotificationStatus, bOnlyCheckModified, pbSettingsModified);
|
||||||
|
|
||||||
// Drive letter - command line arg overrides registry
|
// Drive letter - command line arg overrides registry
|
||||||
if (!bOnlyCheckModified && szDriveLetter[0] == 0)
|
if (!bOnlyCheckModified && bHistory && szDriveLetter[0] == 0)
|
||||||
ConfigReadString ("LastSelectedDrive", "", szDriveLetter, sizeof (szDriveLetter));
|
ConfigReadString ("LastSelectedDrive", "", szDriveLetter, sizeof (szDriveLetter));
|
||||||
if (bHistory && pbSettingsModified)
|
if (bHistory && pbSettingsModified)
|
||||||
{
|
{
|
||||||
@ -846,11 +846,15 @@ void SaveSettings (HWND hwndDlg)
|
|||||||
if (IsHiddenOSRunning())
|
if (IsHiddenOSRunning())
|
||||||
ConfigWriteInt ("HiddenSystemLeakProtNotifStatus", HiddenSysLeakProtectionNotificationStatus);
|
ConfigWriteInt ("HiddenSystemLeakProtNotifStatus", HiddenSysLeakProtectionNotificationStatus);
|
||||||
|
|
||||||
// Drive Letter
|
// save last selected drive only when history enabled
|
||||||
lLetter = GetSelectedLong (GetDlgItem (hwndDlg, IDC_DRIVELIST));
|
if (bHistory)
|
||||||
if (LOWORD (lLetter) != 0xffff)
|
{
|
||||||
StringCbPrintfA (szTmp, sizeof(szTmp), "%c:", (char) HIWORD (lLetter));
|
// Drive Letter
|
||||||
ConfigWriteString ("LastSelectedDrive", szTmp);
|
lLetter = GetSelectedLong (GetDlgItem (hwndDlg, IDC_DRIVELIST));
|
||||||
|
if (LOWORD (lLetter) != 0xffff)
|
||||||
|
StringCbPrintfA (szTmp, sizeof(szTmp), "%c:", (char) HIWORD (lLetter));
|
||||||
|
ConfigWriteString ("LastSelectedDrive", szTmp);
|
||||||
|
}
|
||||||
|
|
||||||
ConfigWriteInt ("CloseSecurityTokenSessionsAfterMount", CloseSecurityTokenSessionsAfterMount);
|
ConfigWriteInt ("CloseSecurityTokenSessionsAfterMount", CloseSecurityTokenSessionsAfterMount);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user