summaryrefslogtreecommitdiff
path: root/drivers/unix/file_access_unix.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/unix/file_access_unix.cpp')
-rw-r--r--drivers/unix/file_access_unix.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/unix/file_access_unix.cpp b/drivers/unix/file_access_unix.cpp
index 9f24633bd4..ee51db6694 100644
--- a/drivers/unix/file_access_unix.cpp
+++ b/drivers/unix/file_access_unix.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -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);
}