diff options
Diffstat (limited to 'messages.cpp')
-rw-r--r-- | messages.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/messages.cpp b/messages.cpp index db6fdad..8617a70 100644 --- a/messages.cpp +++ b/messages.cpp @@ -70,7 +70,11 @@ int RecvMsgSvc(WPARAM w, LPARAM l) 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);
+ return CallService(MS_PROTO_CHAINRECV, w, l);
+ }
cp866_to_cp1251(&output);
MessageBoxA(0, output.c_str(), "", MB_OK);
DeleteFile(tmp2);
@@ -103,7 +107,11 @@ int RecvMsgSvc(WPARAM w, LPARAM l) cmd += _T(" -d -a \"");
cmd += path;
cmd += _T("\"");
- pxExecute(&cmd, "", &out, &code);
+ if(pxExecute(&cmd, "", &out, &code) == pxNotFound)
+ {
+ MessageBox(0, _T("Set path to gpg.exe first!"), _T("Warning"), MB_OK);
+ return CallService(MS_PROTO_CHAINRECV, w, l);
+ }
DeleteFile(path.c_str());
str.clear();
{
@@ -198,7 +206,11 @@ int SendMsgSvc(WPARAM w, LPARAM l) mir_free(tmp);
f.close();
}
- pxExecute(&cmd, "", &out, &code);
+ if(pxExecute(&cmd, "", &out, &code) == pxNotFound)
+ {
+ MessageBox(0, _T("Set path to gpg.exe first!"), _T("Warning"), MB_OK);
+ return CallService(MS_PROTO_CHAINSEND, w, l);
+ }
DeleteFile(path.c_str());
path.append(_T(".asc"));
wfstream f(path.c_str(), std::ios::in);
|