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
|
#ifdef _WIN32
|
||||||
// don't use _stat64 because it doesn't work with VS2015, XP client
|
// don't use _stat64 because it doesn't work with VS2015, XP client
|
||||||
DWORD dwAttrib = GetFileAttributesA(path);
|
DWORD dwAttrib = GetFileAttributesA(path);
|
||||||
return (dwAttrib != INVALID_FILE_ATTRIBUTES
|
return dwAttrib != INVALID_FILE_ATTRIBUTES;
|
||||||
&& !(dwAttrib & FILE_ATTRIBUTE_DIRECTORY)
|
|
||||||
);
|
|
||||||
#else
|
#else
|
||||||
struct stat buf;
|
struct stat buf;
|
||||||
if (stat(path, &buf)) {
|
if (stat(path, &buf)) {
|
||||||
|
|
Loading…
Reference in New Issue