summaryrefslogtreecommitdiff
path: root/gpg_wrapper.cpp
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2010-09-14 12:30:11 +0300
committerGluzskiy Alexandr <sss123next@list.ru>2010-09-14 12:30:11 +0300
commite21fc45beaf3d6abcb012ffecb796e5053e8e5ac (patch)
treef25394033cb4a96378399d3f8a2a1b92390262d2 /gpg_wrapper.cpp
parentce5c8cbc5632891613ccd653d81deb3742c932a7 (diff)
modified: gpg_wrapper.cpp
modified: main.cpp modified: new_gpg.vcproj modified: options.cpp modified: utilities.cpp modified: utilities.h
Diffstat (limited to 'gpg_wrapper.cpp')
-rw-r--r--gpg_wrapper.cpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/gpg_wrapper.cpp b/gpg_wrapper.cpp
index 9c43777..dd8a65d 100644
--- a/gpg_wrapper.cpp
+++ b/gpg_wrapper.cpp
@@ -35,16 +35,6 @@ pxResult pxExecute(wstring *acommandline, char *ainput, string *aoutput, LPDWORD
unsigned long transfered;
int size;
- TCHAR *bin_path = UniGetContactSettingUtf(NULL, szGPGModuleName, "szGpgBinPath", _T(""));
- {
- if(_waccess(bin_path, 0) == -1)
- if(errno == ENOENT)
- {
- mir_free(bin_path);
- *result = pxNotFound;
- return pxNotFound;
- }
- }
wstring commandline;
sattrs.nLength=sizeof(SECURITY_ATTRIBUTES);
@@ -76,11 +66,23 @@ pxResult pxExecute(wstring *acommandline, char *ainput, string *aoutput, LPDWORD
sinfo.hStdError=newstdout;
sinfo.hStdInput=newstdin;
+ TCHAR *bin_path = UniGetContactSettingUtf(NULL, szGPGModuleName, "szGpgBinPath", _T(""));
+ {
+ if(_waccess(bin_path, 0) == -1)
+ {
+ if(errno == ENOENT)
+ {
+ mir_free(bin_path);
+ *result = pxNotFound;
+ return pxNotFound;
+ }
+ }
+ }
+ TCHAR *home_dir = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", _T(""));
{ //form initial command
commandline += _T("\"");
commandline += bin_path;
commandline += _T("\" --homedir \"");
- TCHAR *home_dir = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", _T(""));
commandline += home_dir;
commandline += _T("\" ");
commandline += _T("--display-charset utf-8 ");