Add tests for kiwix::fileExists and kiwix::fileReadable

This commit is contained in:
Nikhil Tanwar committed 2022-01-10 00:18:44 +05:30
1 parent 854058f842
commit 3dbcbe542b
3 files changed
+35 -5

No files matched your search

+2 -2
View File
@@ -306,8 +306,8 @@ bool kiwix::fileExists(const std::string& path)
{
#ifdef _WIN32
return (_waccess_s(Utf8ToWide(path).c_str(), 0) == 0);
#else
return (access(path.c_str(), F_OK) == 0);
#else
return (access(path.c_str(), F_OK) == 0);
#endif
}