diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2023-06-18 23:31:18 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2023-06-18 23:31:18 +0200 |
commit | 2bfeba160c80802287a9c63b0d0e7bd0a1a95079 (patch) | |
tree | b56a66a0544fe68bbf06272a0cde52f32ca6fd31 /src/ExpandVolume/WinMain.cpp | |
parent | 031748a988620274849b78bc4bf592b99e9d6ed7 (diff) | |
download | VeraCrypt-2bfeba160c80802287a9c63b0d0e7bd0a1a95079.tar.gz VeraCrypt-2bfeba160c80802287a9c63b0d0e7bd0a1a95079.zip |
Windows: make Expander first check file existence before proceeding further
Diffstat (limited to 'src/ExpandVolume/WinMain.cpp')
-rw-r--r-- | src/ExpandVolume/WinMain.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ExpandVolume/WinMain.cpp b/src/ExpandVolume/WinMain.cpp index f1e7bfad..bcaaefa8 100644 --- a/src/ExpandVolume/WinMain.cpp +++ b/src/ExpandVolume/WinMain.cpp @@ -1037,7 +1037,12 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa { wchar_t fileName[MAX_PATH]; GetWindowText (GetDlgItem (hwndDlg, IDC_VOLUME), fileName, ARRAYSIZE (fileName)); - ExpandVolumeWizard(hwndDlg, fileName); + if (!VolumePathExists (fileName)) + { + handleWin32Error (hwndDlg, SRC_POS); + } + else + ExpandVolumeWizard(hwndDlg, fileName); } return 1; } |