aboutsummaryrefslogtreecommitdiff
path: root/drivers/unix/file_access_unix.cpp
diff options
context:
space:
mode:
authorJuan Linietsky2015-09-12 10:54:47 -0300
committerJuan Linietsky2015-09-12 10:54:47 -0300
commita88f67821ca828d9b4d3453b19de60e27ab24efc (patch)
tree8601610cad673f7f39c791b8cfe2bebfefffd69a /drivers/unix/file_access_unix.cpp
parent56c907ad040b102c1d74d2d54190238989f1a819 (diff)
downloadgodot-a88f67821ca828d9b4d3453b19de60e27ab24efc.tar.gz
godot-a88f67821ca828d9b4d3453b19de60e27ab24efc.tar.zst
godot-a88f67821ca828d9b4d3453b19de60e27ab24efc.zip
Diffstat (limited to 'drivers/unix/file_access_unix.cpp')
-rw-r--r--drivers/unix/file_access_unix.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/unix/file_access_unix.cpp b/drivers/unix/file_access_unix.cpp
index 76042089f..8e70ecc93 100644
--- a/drivers/unix/file_access_unix.cpp
+++ b/drivers/unix/file_access_unix.cpp
@@ -63,7 +63,7 @@ Error FileAccessUnix::_open(const String& p_path, int p_mode_flags) {
fclose(f);
f=NULL;
- String path=fix_path(p_path);
+ path=fix_path(p_path);
//printf("opening %ls, %i\n", path.c_str(), Memory::get_static_mem_usage());
ERR_FAIL_COND_V(f,ERR_ALREADY_IN_USE);
@@ -114,6 +114,9 @@ void FileAccessUnix::close() {
return;
fclose(f);
f = NULL;
+ if (close_notification_func) {
+ close_notification_func(path,flags);
+ }
if (save_path!="") {
//unlink(save_path.utf8().get_data());
@@ -240,6 +243,7 @@ FileAccess * FileAccessUnix::create_libc() {
return memnew( FileAccessUnix );
}
+CloseNotificationFunc FileAccessUnix::close_notification_func=NULL;
FileAccessUnix::FileAccessUnix() {