diff --git a/lib/mastodon/emoji_cli.rb b/lib/mastodon/emoji_cli.rb index da8fd6a0dc2b23..0a1f538e6fc27a 100644 --- a/lib/mastodon/emoji_cli.rb +++ b/lib/mastodon/emoji_cli.rb @@ -43,7 +43,12 @@ def import(path) tar.each do |entry| 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) if custom_emoji && !options[:overwrite]