summaryrefslogtreecommitdiff
path: root/core/os/dir_access.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-09-17 22:40:54 +0200
committerGitHub <noreply@github.com>2017-09-17 22:40:54 +0200
commit73b8e5acab7e389d7ce8cfb48d533ba74cd86133 (patch)
tree46c6a9cbc85eba19818fa5b9f8ef3c2a6615c194 /core/os/dir_access.cpp
parent65ef19abe3cb95df72f5256b17ec6667ed26cf6d (diff)
parent3528b1e571dee24917b0141232f135e29bf088ba (diff)
Merge pull request #11362 from marcelofg55/fix_x11_export
Fix x11 exported executables not getting the +x flag
Diffstat (limited to 'core/os/dir_access.cpp')
-rw-r--r--core/os/dir_access.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/os/dir_access.cpp b/core/os/dir_access.cpp
index f24d6d16ca..1437e7cdfc 100644
--- a/core/os/dir_access.cpp
+++ b/core/os/dir_access.cpp
@@ -292,7 +292,7 @@ String DirAccess::get_full_path(const String &p_path, AccessType p_access) {
return full;
}
-Error DirAccess::copy(String p_from, String p_to) {
+Error DirAccess::copy(String p_from, String p_to, int chmod_flags) {
//printf("copy %s -> %s\n",p_from.ascii().get_data(),p_to.ascii().get_data());
Error err;
@@ -329,6 +329,11 @@ Error DirAccess::copy(String p_from, String p_to) {
fdst->store_8(fsrc->get_8());
}
+ if (err == OK && chmod_flags != -1) {
+ fdst->close();
+ err = fdst->_chmod(p_to, chmod_flags);
+ }
+
memdelete(fsrc);
memdelete(fdst);