Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore __MACOSX directory for export template and project ZIPs #99947

Merged
merged 1 commit into from
Dec 5, 2024

Conversation

Meorge
Copy link
Contributor

@Meorge Meorge commented Dec 3, 2024

macOS's Archive Utility (built-in ZIP file creator) apparently adds a secret __MACOSX directory to the files it zips. When Godot is unzipping archives it expects to have a specific structure, the presence of the __MACOSX directory and its subfiles can confuse it. For example, a macOS-zipped export templates file could not be imported because Godot was finding a dummy version of version.txt within __MACOSX.

This PR causes the export template importer and the project importer to skip any files in a zipped archive whose paths begin with __MACOSX. I've tested this with both a macOS-zipped export template file and a macOS-zipped project.

@Meorge Meorge requested a review from a team as a code owner December 3, 2024 03:07
@akien-mga akien-mga requested a review from a team December 3, 2024 08:06
@AThousandShips AThousandShips added this to the 4.x milestone Dec 3, 2024
@akien-mga akien-mga modified the milestones: 4.x, 4.4 Dec 3, 2024
@akien-mga
Copy link
Member

Looks good! Could you squash the commits? See PR workflow for instructions.

…d project import ZIP file

Update editor/export/export_template_manager.cpp

Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
@Meorge Meorge force-pushed the ignore-macosx-in-zip branch from 4ba8635 to 2336415 Compare December 4, 2024 21:31
@Meorge
Copy link
Contributor Author

Meorge commented Dec 4, 2024

Done! 😄

Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

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

Code looks good to me.

@Repiteo Repiteo merged commit c153f96 into godotengine:master Dec 5, 2024
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Dec 5, 2024

Thanks!

@Meorge Meorge deleted the ignore-macosx-in-zip branch February 3, 2025 17:27
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.

6 participants