Skip to content

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Jun 30, 2020

Fixes file creation date (TM month range is 0…11, OS::get_date() month range is 1…12).
Fixes file attributes (lost +x flag, and broken files when extracting with macOS Archive Utility), do it like info-zip do:
unix/unix.c#L382

Fixes: #39931

@bruvzg bruvzg added bug platform:macos topic:editor cherrypick:3.x Considered for cherry-picking into a future 3.x release labels Jun 30, 2020
@bruvzg bruvzg added this to the 4.0 milestone Jun 30, 2020
@akien-mga akien-mga merged commit bccb323 into godotengine:master Jun 30, 2020
@akien-mga
Copy link
Member

Thanks!

// 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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A comment along the lines of "Bit-wise operators on signed integers are undefined and probably made the result compiler specific." from #39931 (comment) seems like it would be valuable here as an explanation for why this is implemented in this manner.

@follower
Copy link
Contributor

Re: "(lost +x flag, and broken files when extracting with macOS Archive Utility)"

AFAICT the latest issue wasn't specific to Archive Utility extraction?

Also, given that currently 3.2.2 export to Mac .zip is broken on all platforms due to this issue, does this fix warrant a "hot fix" or similar release for 3.2.2?

@akien-mga
Copy link
Member

Cherry-picked for 3.2.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3.2.2 Linux headless version exports invalid Mac app

3 participants