summaryrefslogtreecommitdiff
path: root/plugins/New_GPG/src/gpg_wrapper.cpp
diff options
context:
space:
mode:
authorAlexander Gluzsky <sss123next@list.ru>2013-02-05 01:51:10 +0000
committerAlexander Gluzsky <sss123next@list.ru>2013-02-05 01:51:10 +0000
commitbd8802ef0df758ca788bbed4851bb51478b28047 (patch)
tree3c354c62ffa937427c9e719e209c2714ac175421 /plugins/New_GPG/src/gpg_wrapper.cpp
parent8770cf2fdfd72c89260edfa924452e8ca7237d93 (diff)
fixed temporary files cleanup during runtime
added temporary files cleanup on start and exit "boosted" code instead of winapi in some places //TODO: "boosted" process management (it will provide more convenient way to control process and work with pipes, it also should be faster because currently loops with sleep interval used) git-svn-id: http://svn.miranda-ng.org/main/trunk@3428 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/New_GPG/src/gpg_wrapper.cpp')
-rwxr-xr-xplugins/New_GPG/src/gpg_wrapper.cpp30
1 files changed, 12 insertions, 18 deletions
diff --git a/plugins/New_GPG/src/gpg_wrapper.cpp b/plugins/New_GPG/src/gpg_wrapper.cpp
index adce958b50..e110f74c73 100755
--- a/plugins/New_GPG/src/gpg_wrapper.cpp
+++ b/plugins/New_GPG/src/gpg_wrapper.cpp
@@ -75,16 +75,13 @@ pxResult pxExecute(wstring *acommandline, char *ainput, string *aoutput, LPDWORD
TCHAR *bin_path = UniGetContactSettingUtf(NULL, szGPGModuleName, "szGpgBinPath", _T(""));
{
- if(_waccess(bin_path, 0) == -1)
+ if(!boost::filesystem::exists(bin_path))
{
- if(errno == ENOENT)
- {
- mir_free(bin_path);
- if(bDebugLog)
- debuglog<<std::string(time_str()+": GPG executable not found");
- *result = pxNotFound;
- return pxNotFound;
- }
+ mir_free(bin_path);
+ if(bDebugLog)
+ debuglog<<std::string(time_str()+": GPG executable not found");
+ *result = pxNotFound;
+ return pxNotFound;
}
}
TCHAR *home_dir = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", _T(""));
@@ -185,16 +182,13 @@ pxResult pxExecute_passwd_change(std::vector<std::wstring> &aargv, char *ainput,
TCHAR *bin_path = UniGetContactSettingUtf(NULL, szGPGModuleName, "szGpgBinPath", _T(""));
{
- if(_waccess(bin_path, 0) == -1)
+ if(!boost::filesystem::exists(bin_path))
{
- if(errno == ENOENT)
- {
- mir_free(bin_path);
- if(bDebugLog)
- debuglog<<std::string(time_str()+": GPG executable not found");
- *result = pxNotFound;
- return pxNotFound;
- }
+ mir_free(bin_path);
+ if(bDebugLog)
+ debuglog<<std::string(time_str()+": GPG executable not found");
+ *result = pxNotFound;
+ return pxNotFound;
}
}