mirror of https://github.com/BOINC/boinc.git
Merge pull request #2008 from JuhaSointusalo/lib-fix-boinc-file-exists
lib: fix boinc_file_exists() on Windows
This commit is contained in:
commit
92d87fbc97
|
@ -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)) {
|
||||
|
|
Loading…
Reference in New Issue