summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2010-08-13 05:54:52 +0300
committerGluzskiy Alexandr <sss123next@list.ru>2010-08-13 05:54:52 +0300
commita5ef2e4a080e26fbb91381edf59da9fc9456f9cb (patch)
tree03618aad11f60ec5ea6f0b90f727ad19e58d8568
parent0f3c11d305cdf1536408ad248b3efd7e4e131dd9 (diff)
modified: messages.cpp
-rw-r--r--messages.cpp25
1 files changed, 22 insertions, 3 deletions
diff --git a/messages.cpp b/messages.cpp
index 8617a70..d3456ec 100644
--- a/messages.cpp
+++ b/messages.cpp
@@ -107,12 +107,29 @@ int RecvMsgSvc(WPARAM w, LPARAM l)
cmd += _T(" -d -a \"");
cmd += path;
cmd += _T("\"");
+ MessageBox(0, cmd.c_str(), _T("in"), MB_OK);
if(pxExecute(&cmd, "", &out, &code) == pxNotFound)
{
- MessageBox(0, _T("Set path to gpg.exe first!"), _T("Warning"), MB_OK);
+ MessageBox(0, _T("Set path to gpg.exe first!"), _T("Warning"), MB_OK);
+ DeleteFile(path.c_str());
return CallService(MS_PROTO_CHAINRECV, w, l);
}
- DeleteFile(path.c_str());
+ MessageBoxA(0, out.c_str(), "out", MB_OK);
+ {
+ wstring tmp = tmp2;
+ tmp += _T("\\decrypted_data");
+ if(_waccess(tmp.c_str(), 0) == -1)
+ {
+ if(errno == ENOENT)
+ {
+ mir_free((void**)pre->szMessage);
+ pre->szMessage = "Failed to decrypt GPG encrypted message";
+ return CallService(MS_PROTO_CHAINRECV, w, (LPARAM)ccs);
+ }
+ }
+ }
+
+
str.clear();
{
wstring path = tmp2;
@@ -206,11 +223,13 @@ int SendMsgSvc(WPARAM w, LPARAM l)
mir_free(tmp);
f.close();
}
+ MessageBox(0, cmd.c_str(), _T("in"), MB_OK);
if(pxExecute(&cmd, "", &out, &code) == pxNotFound)
{
- MessageBox(0, _T("Set path to gpg.exe first!"), _T("Warning"), MB_OK);
+ MessageBox(0, _T("Set path to gpg.exe first!"), _T("Warning"), MB_OK);
return CallService(MS_PROTO_CHAINSEND, w, l);
}
+ MessageBoxA(0, out.c_str(), "out", MB_OK);
DeleteFile(path.c_str());
path.append(_T(".asc"));
wfstream f(path.c_str(), std::ios::in);