mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
* 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>
This commit is contained in:
parent
4552449c26
commit
c7262d12b2
@ -43,7 +43,12 @@ module Mastodon
|
|||||||
tar.each do |entry|
|
tar.each do |entry|
|
||||||
next unless entry.file? && entry.full_name.end_with?('.png')
|
next unless entry.file? && entry.full_name.end_with?('.png')
|
||||||
|
|
||||||
shortcode = [options[:prefix], File.basename(entry.full_name, '.*'), options[:suffix]].compact.join
|
filename = File.basename(entry.full_name, '.*')
|
||||||
|
|
||||||
|
# Skip macOS shadow files
|
||||||
|
next if filename.start_with?('._')
|
||||||
|
|
||||||
|
shortcode = [options[:prefix], filename, options[:suffix]].compact.join
|
||||||
custom_emoji = CustomEmoji.local.find_by(shortcode: shortcode)
|
custom_emoji = CustomEmoji.local.find_by(shortcode: shortcode)
|
||||||
|
|
||||||
if custom_emoji && !options[:overwrite]
|
if custom_emoji && !options[:overwrite]
|
||||||
|
Loading…
Reference in New Issue
Block a user