Pārlūkot izejas kodu

[Wine] Use _SH_DENY* flags instead of unsupported _SH_SECURE.

Pāvels Nadtočajevs 3 mēneši atpakaļ
vecāks
revīzija
563136f859
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      drivers/windows/file_access_windows.cpp

+ 1 - 1
drivers/windows/file_access_windows.cpp

@@ -214,7 +214,7 @@ Error FileAccessWindows::open_internal(const String &p_path, int p_mode_flags) {
 		path = tmpfile;
 		path = tmpfile;
 	}
 	}
 
 
-	f = _wfsopen((LPCWSTR)(path.utf16().get_data()), mode_string, is_backup_save_enabled() ? _SH_SECURE : _SH_DENYNO);
+	f = _wfsopen((LPCWSTR)(path.utf16().get_data()), mode_string, is_backup_save_enabled() ? ((p_mode_flags == READ) ? _SH_DENYWR : _SH_DENYRW) : _SH_DENYNO);
 
 
 	if (f == nullptr) {
 	if (f == nullptr) {
 		switch (errno) {
 		switch (errno) {