diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-06-30 09:57:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-30 09:57:45 +0200 |
commit | bccb323396377eafc4d51fe4ea70705144006033 (patch) | |
tree | a39b63db8651066db26ded2f96715be2ae2dd112 /platform | |
parent | 5a33c77f0ad6552876e9fc01bd2476b8a262f07a (diff) | |
parent | accae11fe3f28e1da27b67346f3303f68160a375 (diff) |
Merge pull request #39977 from bruvzg/fix_zip_file_mode_again
[macOS export] Set correct external file attributes, and creation time.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/osx/export/export.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/platform/osx/export/export.cpp b/platform/osx/export/export.cpp index 9af7c02351..916816325d 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, |