1
0
Fork 1
mirror of https://akkoma.dev/AkkomaGang/akkoma.git synced 2024-09-11 14:17:21 +01:00

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

View file

@ -34,7 +34,6 @@ defp reject_emoji?({shortcode, _url}, installed_emoji) 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