Merge pull request #2008 from JuhaSointusalo/lib-fix-boinc-file-exists

lib: fix boinc_file_exists() on Windows
This commit is contained in:
David Anderson 2017-08-09 22:36:48 -07:00 committed by GitHub
commit 92d87fbc97
1 changed files with 1 additions and 3 deletions

View File

@ -547,9 +547,7 @@ int boinc_file_exists(const char* path) {
#ifdef _WIN32
// don't use _stat64 because it doesn't work with VS2015, XP client
DWORD dwAttrib = GetFileAttributesA(path);
return (dwAttrib != INVALID_FILE_ATTRIBUTES
&& !(dwAttrib & FILE_ATTRIBUTE_DIRECTORY)
);
return dwAttrib != INVALID_FILE_ATTRIBUTES;
#else
struct stat buf;
if (stat(path, &buf)) {