1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

[FileAccess] Set last_error on file read/write errors.

This commit is contained in:
bruvzg
2024-12-02 12:03:28 +02:00
committed by Pāvels Nadtočajevs
parent 893bbdfde8
commit d97313cd7d
4 changed files with 30 additions and 13 deletions

View File

@@ -43,7 +43,7 @@ typedef void (*CloseNotificationFunc)(const String &p_file, int p_flags);
class FileAccessUnix : public FileAccess {
FILE *f = nullptr;
int flags = 0;
void check_errors() const;
void check_errors(bool p_write = false) const;
mutable Error last_error = OK;
String save_path;
String path;