You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-05 17:15:09 +00:00
[Windows] Fix get_modified_time on locked files.
(cherry picked from commit 6597fa24a9)
This commit is contained in:
committed by
Rémi Verschelde
parent
14992b1341
commit
56ba35a431
@@ -418,7 +418,7 @@ uint64_t FileAccessWindows::_get_modified_time(const String &p_file) {
|
|||||||
file = file.substr(0, file.length() - 1);
|
file = file.substr(0, file.length() - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
HANDLE handle = CreateFileW((LPCWSTR)(file.utf16().get_data()), GENERIC_READ, FILE_SHARE_READ, nullptr, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, nullptr);
|
HANDLE handle = CreateFileW((LPCWSTR)(file.utf16().get_data()), FILE_READ_ATTRIBUTES, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, nullptr, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, nullptr);
|
||||||
|
|
||||||
if (handle != INVALID_HANDLE_VALUE) {
|
if (handle != INVALID_HANDLE_VALUE) {
|
||||||
FILETIME ft_create, ft_write;
|
FILETIME ft_create, ft_write;
|
||||||
|
|||||||
Reference in New Issue
Block a user