Fix file_exists

This commit is contained in:
sanikoyes 2014-09-19 12:22:32 +08:00
parent 7d6b160a44
commit d0a45aafd3

View file

@ -315,7 +315,7 @@ bool DirAccessWindows::file_exists(String p_file) {
DWORD fileAttr;
fileAttr = GetFileAttributesExW(p_file.c_str(), GetFileExInfoStandard, &fileInfo);
if (0xFFFFFFFF == fileAttr)
if (0 == fileAttr)
return false;
return !(fileAttr&FILE_ATTRIBUTE_DIRECTORY);
@ -324,7 +324,7 @@ bool DirAccessWindows::file_exists(String p_file) {
DWORD fileAttr;
fileAttr = GetFileAttributesExA(p_file.ascii().get_data(), GetFileExInfoStandard, &fileInfo);
if (0xFFFFFFFF == fileAttr)
if (0 == fileAttr)
return false;
return !(fileAttr&FILE_ATTRIBUTE_DIRECTORY);