diff options
Diffstat (limited to 'options.cpp')
-rw-r--r-- | options.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/options.cpp b/options.cpp index 906119a..0039b39 100644 --- a/options.cpp +++ b/options.cpp @@ -167,7 +167,12 @@ static BOOL CALLBACK DlgProcGpgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA ptmp = mir_a2t(tmp);
cmd += ptmp;
mir_free(ptmp);
- pxExecute(&cmd, "", &output,&exitcode);
+ if(pxExecute(&cmd, "", &output,&exitcode) == pxNotFound)
+ {
+ MessageBox(0, _T("Set path to gpg.exe first!"), _T("Warning"), MB_OK);
+ mir_free(tmp);
+ break;
+ }
MessageBoxA(0, "Key removed from GPG keyring", "info", MB_OK);
}
mir_free(tmp);
@@ -376,7 +381,11 @@ static BOOL CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam,LP cmd += tmp2;
cmd += _T("\"");
}
- pxExecute(&cmd, "", &output, &exitcode);
+ if(pxExecute(&cmd, "", &output, &exitcode) == pxNotFound)
+ {
+ MessageBox(0, _T("Set path to gpg.exe first!"), _T("Warning"), MB_OK);
+ break;
+ }
cp866_to_cp1251(&output);
{
string::size_type s = output.find("gpg: key ") + strlen("gpg: key ");
|