Merge pull request #708 from sanikoyes/Pr-fix-file-exists
Fix file_exists
This commit is contained in:
commit
05d5253f8a
1 changed files with 2 additions and 2 deletions
|
@ -315,7 +315,7 @@ bool DirAccessWindows::file_exists(String p_file) {
|
||||||
DWORD fileAttr;
|
DWORD fileAttr;
|
||||||
|
|
||||||
fileAttr = GetFileAttributesExW(p_file.c_str(), GetFileExInfoStandard, &fileInfo);
|
fileAttr = GetFileAttributesExW(p_file.c_str(), GetFileExInfoStandard, &fileInfo);
|
||||||
if (0xFFFFFFFF == fileAttr)
|
if (0 == fileAttr)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return !(fileAttr&FILE_ATTRIBUTE_DIRECTORY);
|
return !(fileAttr&FILE_ATTRIBUTE_DIRECTORY);
|
||||||
|
@ -324,7 +324,7 @@ bool DirAccessWindows::file_exists(String p_file) {
|
||||||
DWORD fileAttr;
|
DWORD fileAttr;
|
||||||
|
|
||||||
fileAttr = GetFileAttributesExA(p_file.ascii().get_data(), GetFileExInfoStandard, &fileInfo);
|
fileAttr = GetFileAttributesExA(p_file.ascii().get_data(), GetFileExInfoStandard, &fileInfo);
|
||||||
if (0xFFFFFFFF == fileAttr)
|
if (0 == fileAttr)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return !(fileAttr&FILE_ATTRIBUTE_DIRECTORY);
|
return !(fileAttr&FILE_ATTRIBUTE_DIRECTORY);
|
||||||
|
|
Loading…
Reference in a new issue