From cdbbc75e906ec7b40a1426e4cfc2e05eaeeb275b Mon Sep 17 00:00:00 2001 From: PouleyKetchoupp Date: Sat, 20 Jun 2020 10:04:18 +0200 Subject: [PATCH] Set proper file type attribute for OSX zip export The missing file type in file attributes was causing the file to lose executable permissions when unzipped with some softwares. (cherry picked from commit 4501771fd8743e5019fe313e7e6f890d0d68cbd8) --- platform/osx/export/export.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platform/osx/export/export.cpp b/platform/osx/export/export.cpp index a57b21ad757..e426f0844c6 100644 --- a/platform/osx/export/export.cpp +++ b/platform/osx/export/export.cpp @@ -753,7 +753,10 @@ void EditorExportPlatformOSX::_zip_folder_recursive(zipFile &p_zip, const String zipfi.tmz_date.tm_sec = time.sec; zipfi.tmz_date.tm_year = date.year; zipfi.dosDate = 0; - zipfi.external_fa = (is_executable ? 0755 : 0644) << 16L; + // 0100000: regular file type + // 0000755: permissions rwxr-xr-x + // 0000644: permissions rw-r--r-- + zipfi.external_fa = (is_executable ? 0100755 : 0100644) << 16L; zipfi.internal_fa = 0; zipOpenNewFileInZip4(p_zip,