summaryrefslogtreecommitdiff
path: root/plugins/New_GPG/src/gpg_wrapper.cpp
diff options
context:
space:
mode:
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;
}
}