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

Improve Emoji import (fix #15429) #15430

Merged
merged 4 commits into from
Dec 30, 2020
Merged

Conversation

cortices
Copy link
Contributor

Skip macOS '._' shadow files in tar archive to speed up emoji importing. Basic testing showed it to work fine in distinguishing & ignoring shadow files.

Skip macOS '._' shadow files in tar archive to speed up import
@@ -41,9 +41,14 @@ def import(path)

Gem::Package::TarReader.new(Zlib::GzipReader.open(path)) do |tar|
tar.each do |entry|
# File exists && Extension is PNG && not a macOS shadow file (begin with ._)
Copy link
Member

Choose a reason for hiding this comment

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

Comment seems to repeat what's on the line below. The macOS part is relevant but it's not above the line where it's actually checked.

lib/mastodon/emoji_cli.rb Show resolved Hide resolved
cortices and others added 2 commits December 27, 2020 16:51
suggestions from Gargron to improve comment

Co-authored-by: Eugen Rochko <eugen@zeonfederated.com>
Remove extraneous comment (macOS-specific comment now with correct line)
@cortices cortices requested a review from Gargron December 27, 2020 05:55
@Gargron Gargron merged commit c7262d1 into mastodon:master Dec 30, 2020
ClearlyClaire pushed a commit to ClearlyClaire/mastodon that referenced this pull request Jan 28, 2022
* Improve Emoji import

Skip macOS '._' shadow files in tar archive to speed up import

* Fix codeclimate format issue with whitespace

* Update lib/mastodon/emoji_cli.rb

suggestions from Gargron to improve comment

Co-authored-by: Eugen Rochko <eugen@zeonfederated.com>

* Update emoji_cli.rb

Remove extraneous comment (macOS-specific comment now with correct line)

Co-authored-by: Eugen Rochko <eugen@zeonfederated.com>
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

Successfully merging this pull request may close these issues.

2 participants