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

Add check for __MACOSX folder #403

Open
TeBenachi opened this issue Oct 11, 2021 · 7 comments
Open

Add check for __MACOSX folder #403

TeBenachi opened this issue Oct 11, 2021 · 7 comments

Comments

@TeBenachi
Copy link
Contributor

macOS automatically inserts the __MACOSX folder when creating a zip. The __MACOSX folder is a hidden directory and is not visible to the users as default. There is a way to delete the folder using the command line, but it can be easily missed as it is not visible.
A required or warning message can help remind the Mac users to delete the hidden folder before submission.

@carolinan
Copy link
Collaborator

This is already a check in https://github.com/WordPress/theme-check/blob/master/checks/class-file-check.php#L60.
Is it not working?

@TeBenachi
Copy link
Contributor Author

Thanks for pointing me to the file!

My last upload went through with the__MACOSX folder in the zip. (version 1.0.0)
https://themes.trac.wordpress.org/ticket/106766

I think it is because __MACOSX is rather a folder than a file.

@kafleg
Copy link
Member

kafleg commented Oct 13, 2021

Did you check the SVN? https://themes.svn.wordpress.org/mebae/1.0.1/ There is not such file found here.

@TeBenachi
Copy link
Contributor Author

Yes. I removed the __MACOSX from the version 1.0.0 after the initial upload.

@TeBenachi
Copy link
Contributor Author

Related issue on Slack.
https://wordpress.slack.com/archives/C02RP4Y3K/p1634255617397600

The author also asked if it is possible to remove the hidden files/folders upon uploading the newer version.

@dd32
Copy link
Member

dd32 commented Oct 18, 2021

I think it is because __MACOSX is rather a folder than a file.

This is the problem indeed, __MACOSX should be moved to https://github.com/WordPress/theme-check/blob/master/checks/class-directories-check.php - but I don't think that's working either, as shown by https://themes.trac.wordpress.org/ticket/106975 which has a .git and .ideas directory.

@TeBenachi
Copy link
Contributor Author

PR #414 detects __MACOSX and alerts users but it only works when __MACOSX is in the root level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants