summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2019-04-07 15:46:52 -0300
committerJuan Linietsky <reduzio@gmail.com>2019-04-07 15:45:30 -0300
commitcd4449e7abe97b2bc883e2d182db2cc41eb35f8c (patch)
tree2498bac08105314c5defedde82141430e01ffd0c /platform
parent65f3a953de3db4406f099d014acbc630f53eca9c (diff)
Add FileAccess::set_unix_permissions for Unix platforms
Diffstat (limited to 'platform')
-rw-r--r--platform/android/file_access_android.h2
-rw-r--r--platform/android/file_access_jandroid.h2
-rw-r--r--platform/osx/export/export.cpp2
3 files changed, 5 insertions, 1 deletions
diff --git a/platform/android/file_access_android.h b/platform/android/file_access_android.h
index f8d46ea5d2..b8e78627ec 100644
--- a/platform/android/file_access_android.h
+++ b/platform/android/file_access_android.h
@@ -70,6 +70,8 @@ public:
virtual bool file_exists(const String &p_path); ///< return true if a file exists
virtual uint64_t _get_modified_time(const String &p_file) { return 0; }
+ virtual uint32_t _get_unix_permissions(const String &p_file) { return 0; }
+ virtual Error _set_unix_permissions(const String &p_file, uint32_t p_permissions) { return FAILED; }
//static void make_default();
diff --git a/platform/android/file_access_jandroid.h b/platform/android/file_access_jandroid.h
index 4f02fea81d..9429100d65 100644
--- a/platform/android/file_access_jandroid.h
+++ b/platform/android/file_access_jandroid.h
@@ -74,6 +74,8 @@ public:
static void setup(jobject p_io);
virtual uint64_t _get_modified_time(const String &p_file) { return 0; }
+ virtual uint32_t _get_unix_permissions(const String &p_file) { return 0; }
+ virtual Error _set_unix_permissions(const String &p_file, uint32_t p_permissions) { return FAILED; }
FileAccessJAndroid();
~FileAccessJAndroid();
diff --git a/platform/osx/export/export.cpp b/platform/osx/export/export.cpp
index 5e94bc457b..1a63d6ff75 100644
--- a/platform/osx/export/export.cpp
+++ b/platform/osx/export/export.cpp
@@ -568,7 +568,7 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
f->close();
if (is_execute) {
// Chmod with 0755 if the file is executable
- f->_chmod(file, 0755);
+ FileAccess::set_unix_permissions(file, 0755);
}
memdelete(f);
} else {