StealEmoji: drop superfluous basename

Since 3 commits ago we restrict shortcodes to a subset of
the POSIX Portable Filename Character Set, therefore
this can never have a directory component.
This commit is contained in:
Oneric 2024-03-07 23:39:00 +01:00
parent a8c6c780b4
commit 5b126567bb
1 changed files with 0 additions and 1 deletions

View File

@ -34,7 +34,6 @@ defmodule Pleroma.Web.ActivityPub.MRF.StealEmojiPolicy do
end
defp steal_emoji(%{} = response, {shortcode, extension}, emoji_dir_path) do
shortcode = Path.basename(shortcode)
file_path = Path.join(emoji_dir_path, shortcode <> "." <> extension)
case File.write(file_path, response.body) do