diff options
author | Gluzskiy Alexandr <sss123next@list.ru> | 2010-08-12 22:02:18 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss123next@list.ru> | 2010-08-12 22:02:18 +0300 |
commit | 641a23ca97dea2958849593485fc4022a084eb07 (patch) | |
tree | 9d04afde06d0f14ace7fc8578f14687c0ac0a58d | |
parent | 07bff43c1ee8ffb1e19dc2ed6419f602c0053f56 (diff) |
modified: messages.cpp
-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)
{
|