GetFileAttributesEx returns 'zero' in case of an error

This commit is contained in:
twinaphex 2015-10-03 01:01:57 +02:00
parent 85be9b907d
commit 61a630fabe

View File

@ -102,7 +102,7 @@ static bool path_stat(const char *path, enum stat_mode mode, int32_t *size)
#elif defined(_WIN32)
WIN32_FILE_ATTRIBUTE_DATA file_info;
DWORD ret = GetFileAttributesEx(path, GetFileExInfoStandard, &file_info);
if (ret == INVALID_FILE_ATTRIBUTES)
if (ret == 0)
return false;
#else
struct stat buf;