diff options
author | Gluzskiy Alexandr <sss123next@list.ru> | 2010-09-14 12:30:11 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss123next@list.ru> | 2010-09-14 12:30:11 +0300 |
commit | e21fc45beaf3d6abcb012ffecb796e5053e8e5ac (patch) | |
tree | f25394033cb4a96378399d3f8a2a1b92390262d2 /gpg_wrapper.cpp | |
parent | ce5c8cbc5632891613ccd653d81deb3742c932a7 (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.cpp | 24 |
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 "); |