summaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/main.cpp b/main.cpp
index b3f01d5..b93f9f5 100644
--- a/main.cpp
+++ b/main.cpp
@@ -24,6 +24,14 @@ void test()
DWORD exitcode;
string output;
TCHAR *bin_path = UniGetContactSettingUtf(NULL, szModuleName, "szGpgBinPath", _T(""));
+ {
+ if(_waccess(bin_path, 0) == -1)
+ if(errno == ENOENT)
+ {
+ mir_free(bin_path);
+ return;
+ }
+ }
TCHAR *home_dir = UniGetContactSettingUtf(NULL, szModuleName, "szHomePath", _T(""));
TCHAR bin[512];
_tcscpy(bin, bin_path);
@@ -35,5 +43,8 @@ void test()
pxResult pxresult=pxExecute(bin,"",&output,&exitcode);
mir_free(bin_path);
mir_free(home_dir);
- MessageBoxA(0, output.c_str(), "", MB_OK);
+/* fstream f("c:\\str.txt", std::ios::out);
+ f<<output;
+ f.close();
+ MessageBoxA(0, output.c_str(), "", MB_OK); */
} \ No newline at end of file