diff options
Diffstat (limited to 'drivers/unix/file_access_unix.cpp')
-rw-r--r-- | drivers/unix/file_access_unix.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/unix/file_access_unix.cpp b/drivers/unix/file_access_unix.cpp index 9f24633bd4..2838e7d913 100644 --- a/drivers/unix/file_access_unix.cpp +++ b/drivers/unix/file_access_unix.cpp @@ -124,6 +124,11 @@ void FileAccessUnix::close() { //unlink(save_path.utf8().get_data()); //print_line("renaming.."); int rename_error = rename((save_path+".tmp").utf8().get_data(),save_path.utf8().get_data()); + + if (rename_error && close_fail_notify) { + close_fail_notify(save_path); + } + save_path=""; ERR_FAIL_COND( rename_error != 0); } |