mirror of
https://github.com/godotengine/godot.git
synced 2025-01-22 10:32:54 -05:00
Don't open file in file_exists for Windows.
This commit is contained in:
parent
abf8e1e6f9
commit
1732888777
1 changed files with 2 additions and 7 deletions
|
@ -402,13 +402,8 @@ bool FileAccessWindows::file_exists(const String &p_name) {
|
||||||
}
|
}
|
||||||
|
|
||||||
String filename = fix_path(p_name);
|
String filename = fix_path(p_name);
|
||||||
FILE *g = _wfsopen((LPCWSTR)(filename.utf16().get_data()), L"rb", _SH_DENYNO);
|
DWORD file_attr = GetFileAttributesW((LPCWSTR)(filename.utf16().get_data()));
|
||||||
if (g == nullptr) {
|
return (file_attr != INVALID_FILE_ATTRIBUTES) && !(file_attr & FILE_ATTRIBUTE_DIRECTORY);
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
fclose(g);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64_t FileAccessWindows::_get_modified_time(const String &p_file) {
|
uint64_t FileAccessWindows::_get_modified_time(const String &p_file) {
|
||||||
|
|
Loading…
Reference in a new issue