Skip to content

Commit 563136f

Browse files
committed
[Wine] Use _SH_DENY* flags instead of unsupported _SH_SECURE.
1 parent 09fcbb8 commit 563136f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/windows/file_access_windows.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ Error FileAccessWindows::open_internal(const String &p_path, int p_mode_flags) {
214214
path = tmpfile;
215215
}
216216

217-
f = _wfsopen((LPCWSTR)(path.utf16().get_data()), mode_string, is_backup_save_enabled() ? _SH_SECURE : _SH_DENYNO);
217+
f = _wfsopen((LPCWSTR)(path.utf16().get_data()), mode_string, is_backup_save_enabled() ? ((p_mode_flags == READ) ? _SH_DENYWR : _SH_DENYRW) : _SH_DENYNO);
218218

219219
if (f == nullptr) {
220220
switch (errno) {

0 commit comments

Comments
 (0)