diff options
-rw-r--r-- | messages.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/messages.cpp b/messages.cpp index cb38468..7a16dcd 100644 --- a/messages.cpp +++ b/messages.cpp @@ -52,7 +52,6 @@ int RecvMsgSvc(WPARAM w, LPARAM l) char *tmp = mir_t2a(str.c_str());
TCHAR *tmp2 = UniGetContactSettingUtf(NULL, szModuleName, "szHomePath", _T(""));
wstring path = tmp2;
- mir_free(tmp2);
path.append(_T("\\encrypted_data.asc"));
wfstream f(path.c_str(), std::ios::out);
f<<tmp;
@@ -62,13 +61,18 @@ int RecvMsgSvc(WPARAM w, LPARAM l) string out;
DWORD code;
wstring cmd;
+ cmd += _T("--output \"");
+ cmd += tmp2;
+ cmd += _T("\\decrypted_data\"");
+ mir_free(tmp2);
cmd += _T(" -d -a \"");
cmd += path;
+ cmd += _T("\"");
pxExecute(&cmd, "", &out, &code);
DeleteFile(path.c_str());
cp866_to_cp1251(&out);
{
- string::size_type p = out.find(">\"\n") +3;
+ string::size_type p = out.find(">\"") +2;
TCHAR *tmp = mir_a2t (out.substr(p).c_str());
if(_tcslen(tmp) > 0)
{
|