diff options
Diffstat (limited to 'protocols/WhatsApp/src/WhatsAPI++/utilities.cpp')
-rw-r--r-- | protocols/WhatsApp/src/WhatsAPI++/utilities.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/protocols/WhatsApp/src/WhatsAPI++/utilities.cpp b/protocols/WhatsApp/src/WhatsAPI++/utilities.cpp index 0ec6e7e962..f2603f9f8d 100644 --- a/protocols/WhatsApp/src/WhatsAPI++/utilities.cpp +++ b/protocols/WhatsApp/src/WhatsAPI++/utilities.cpp @@ -2,6 +2,7 @@ #include "utilities.h"
#include <iostream>
+#include <io.h>
#include <cstdio>
#include <stdlib.h>
#include <cstdlib>
@@ -261,8 +262,7 @@ vector<unsigned char>* loadFileToBytes(const string& path) { }
bool fileExists(const std::string& path) {
- std::ifstream in(path.c_str());
- return in != NULL;
+ return _access(path.c_str(), 0) == 0;
}
|