From 2bfeba160c80802287a9c63b0d0e7bd0a1a95079 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sun, 18 Jun 2023 23:31:18 +0200 Subject: Windows: make Expander first check file existence before proceeding further --- src/ExpandVolume/WinMain.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/ExpandVolume') 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; } -- cgit v1.2.3