You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
Change rb+ to wb+ on file access READ_WRITE to allow more use cases, closes #2278
This commit is contained in:
@@ -74,7 +74,7 @@ Error FileAccessUnix::_open(const String& p_path, int p_mode_flags) {
|
|||||||
else if (p_mode_flags==WRITE)
|
else if (p_mode_flags==WRITE)
|
||||||
mode_string="wb";
|
mode_string="wb";
|
||||||
else if (p_mode_flags==READ_WRITE)
|
else if (p_mode_flags==READ_WRITE)
|
||||||
mode_string="rb+";
|
mode_string="wb+";
|
||||||
else
|
else
|
||||||
return ERR_INVALID_PARAMETER;
|
return ERR_INVALID_PARAMETER;
|
||||||
|
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ Error FileAccessWindows::_open(const String& p_filename, int p_mode_flags) {
|
|||||||
else if (p_mode_flags==WRITE)
|
else if (p_mode_flags==WRITE)
|
||||||
mode_string=L"wb";
|
mode_string=L"wb";
|
||||||
else if (p_mode_flags==READ_WRITE)
|
else if (p_mode_flags==READ_WRITE)
|
||||||
mode_string=L"rb+";
|
mode_string=L"wb+";
|
||||||
else
|
else
|
||||||
return ERR_INVALID_PARAMETER;
|
return ERR_INVALID_PARAMETER;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user