summaryrefslogtreecommitdiff
path: root/drivers/unix
diff options
context:
space:
mode:
authorMarcelo Fernandez <marcelofg55@gmail.com>2017-09-17 14:40:58 -0300
committerMarcelo Fernandez <marcelofg55@gmail.com>2017-09-17 14:40:58 -0300
commit3528b1e571dee24917b0141232f135e29bf088ba (patch)
tree1994ea234d7c52dac02084242671348844bed3fc /drivers/unix
parent574a5714dcbf5fcf126f3f99caab62a345e665c1 (diff)
Fix x11 exported executables not getting the +x flag
Diffstat (limited to 'drivers/unix')
-rw-r--r--drivers/unix/file_access_unix.cpp9
-rw-r--r--drivers/unix/file_access_unix.h2
2 files changed, 11 insertions, 0 deletions
diff --git a/drivers/unix/file_access_unix.cpp b/drivers/unix/file_access_unix.cpp
index 80565c5b02..e19bc738cb 100644
--- a/drivers/unix/file_access_unix.cpp
+++ b/drivers/unix/file_access_unix.cpp
@@ -274,6 +274,15 @@ uint64_t FileAccessUnix::_get_modified_time(const String &p_file) {
};
}
+Error FileAccessUnix::_chmod(const String &p_path, int p_mod) {
+ int err = chmod(p_path.utf8().get_data(), p_mod);
+ if (!err) {
+ return OK;
+ }
+
+ return FAILED;
+}
+
FileAccess *FileAccessUnix::create_libc() {
return memnew(FileAccessUnix);
diff --git a/drivers/unix/file_access_unix.h b/drivers/unix/file_access_unix.h
index 6e5110431f..c5ab8821be 100644
--- a/drivers/unix/file_access_unix.h
+++ b/drivers/unix/file_access_unix.h
@@ -78,6 +78,8 @@ public:
virtual uint64_t _get_modified_time(const String &p_file);
+ virtual Error _chmod(const String &p_path, int p_mod);
+
FileAccessUnix();
virtual ~FileAccessUnix();
};