diff options
Diffstat (limited to 'plugins/DbChecker/src/fileaccess.cpp')
-rw-r--r-- | plugins/DbChecker/src/fileaccess.cpp | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/plugins/DbChecker/src/fileaccess.cpp b/plugins/DbChecker/src/fileaccess.cpp index f9b6e2d656..ef19a1244f 100644 --- a/plugins/DbChecker/src/fileaccess.cpp +++ b/plugins/DbChecker/src/fileaccess.cpp @@ -47,19 +47,10 @@ INT_PTR CALLBACK FileAccessDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARA break;
case IDOK:
- if (opts.bCheckOnly) {
- if (!opts.hFile) {
- opts.hFile = CreateFile(opts.filename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
- if (opts.hFile == INVALID_HANDLE_VALUE) {
- opts.hFile = NULL;
- opts.error = GetLastError();
- SendMessage(GetParent(hdlg), WZM_GOTOPAGE, IDD_OPENERROR, (LPARAM)OpenErrorDlgProc);
- break;
- }
- }
- SendMessage(GetParent(hdlg), WZM_GOTOPAGE, IDD_PROGRESS, (LPARAM)ProgressDlgProc);
- }
- else SendMessage(GetParent(hdlg), WZM_GOTOPAGE, IDD_CLEANING, (LPARAM)CleaningDlgProc);
+ if (opts.bCheckOnly)
+ OpenDatabase(hdlg, IDD_PROGRESS);
+ else
+ SendMessage(GetParent(hdlg), WZM_GOTOPAGE, IDD_CLEANING, (LPARAM)CleaningDlgProc);
break;
case IDC_CHECKONLY:
|