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

Windows: make Expander first check file existence before proceeding further

This commit is contained in:
Mounir IDRASSI
2023-06-18 23:31:18 +02:00
parent 031748a988
commit 2bfeba160c

View File

@@ -1037,6 +1037,11 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
{ {
wchar_t fileName[MAX_PATH]; wchar_t fileName[MAX_PATH];
GetWindowText (GetDlgItem (hwndDlg, IDC_VOLUME), fileName, ARRAYSIZE (fileName)); GetWindowText (GetDlgItem (hwndDlg, IDC_VOLUME), fileName, ARRAYSIZE (fileName));
if (!VolumePathExists (fileName))
{
handleWin32Error (hwndDlg, SRC_POS);
}
else
ExpandVolumeWizard(hwndDlg, fileName); ExpandVolumeWizard(hwndDlg, fileName);
} }
return 1; return 1;