Skip to content

Commit 3d645bd

Browse files
committed
Merge pull request #106392 from bruvzg/wine_sh_secure
[Wine] Use `_SH_DENY*` flags instead of unsupported `_SH_SECURE`.
2 parents 43010e8 + 563136f commit 3d645bd

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)