You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-12 13:20:55 +00:00
-Add visible IO errors when closing a file fails due to it being locked (most likely on windows), closes #4760
This commit is contained in:
@@ -47,6 +47,8 @@ public:
|
||||
ACCESS_MAX
|
||||
};
|
||||
|
||||
typedef void (*FileCloseFailNotify)(const String&);
|
||||
|
||||
typedef FileAccess*(*CreateFunc)();
|
||||
bool endian_swap;
|
||||
bool real_is_double;
|
||||
@@ -56,7 +58,7 @@ protected:
|
||||
virtual Error _open(const String& p_path, int p_mode_flags)=0; ///< open a file
|
||||
virtual uint64_t _get_modified_time(const String& p_file)=0;
|
||||
|
||||
|
||||
static FileCloseFailNotify close_fail_notify;
|
||||
private:
|
||||
|
||||
static bool backup_save;
|
||||
@@ -69,8 +71,12 @@ private:
|
||||
return memnew( T );
|
||||
}
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
static void set_file_close_fail_notify_callback(FileCloseFailNotify p_cbk) { close_fail_notify=p_cbk; }
|
||||
|
||||
virtual void _set_access_type(AccessType p_access);
|
||||
|
||||
enum ModeFlags {
|
||||
|
||||
Reference in New Issue
Block a user