VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2023-06-18 23:31:18 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2023-06-18 23:31:18 +0200
commit2bfeba160c80802287a9c63b0d0e7bd0a1a95079 (patch)
treeb56a66a0544fe68bbf06272a0cde52f32ca6fd31 /src
parent031748a988620274849b78bc4bf592b99e9d6ed7 (diff)
downloadVeraCrypt-2bfeba160c80802287a9c63b0d0e7bd0a1a95079.tar.gz
VeraCrypt-2bfeba160c80802287a9c63b0d0e7bd0a1a95079.zip
Windows: make Expander first check file existence before proceeding further
Diffstat (limited to 'src')
-rw-r--r--src/ExpandVolume/WinMain.cpp7
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;
}