From accae11fe3f28e1da27b67346f3303f68160a375 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Tue, 30 Jun 2020 10:16:02 +0300 Subject: [PATCH] [macOS export] Set correct external file attributes (Unix mode), and creation time. --- platform/osx/export/export.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/platform/osx/export/export.cpp b/platform/osx/export/export.cpp index 9af7c023519..916816325d1 100644 --- a/platform/osx/export/export.cpp +++ b/platform/osx/export/export.cpp @@ -825,14 +825,15 @@ void EditorExportPlatformOSX::_zip_folder_recursive(zipFile &p_zip, const String zipfi.tmz_date.tm_hour = time.hour; zipfi.tmz_date.tm_mday = date.day; zipfi.tmz_date.tm_min = time.min; - zipfi.tmz_date.tm_mon = date.month; + zipfi.tmz_date.tm_mon = date.month - 1; // Note: "tm" month range - 0..11, Godot month range - 1..12, http://www.cplusplus.com/reference/ctime/tm/ zipfi.tmz_date.tm_sec = time.sec; zipfi.tmz_date.tm_year = date.year; zipfi.dosDate = 0; // 0100000: regular file type // 0000755: permissions rwxr-xr-x // 0000644: permissions rw-r--r-- - zipfi.external_fa = (is_executable ? 0100755 : 0100644) << 16L; + uint32_t _mode = (is_executable ? 0100755 : 0100644); + zipfi.external_fa = (_mode << 16L) | !(_mode & 0200); zipfi.internal_fa = 0; zipOpenNewFileInZip4(p_zip,