From: lain Date: Fri, 7 Jun 2019 15:31:21 +0000 (+0200) Subject: Emoji: Use full path to check if a file is a directory. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=cb3258c863f7485551eb28474d60f12547019d34;p=akkoma Emoji: Use full path to check if a file is a directory. --- diff --git a/lib/pleroma/emoji.ex b/lib/pleroma/emoji.ex index de7fcc1ce..b77b26f7f 100644 --- a/lib/pleroma/emoji.ex +++ b/lib/pleroma/emoji.ex @@ -98,7 +98,9 @@ defmodule Pleroma.Emoji do Logger.error("Could not access the custom emoji directory #{emoji_dir_path}: #{e}") {:ok, results} -> - grouped = Enum.group_by(results, &File.dir?/1) + grouped = + Enum.group_by(results, fn file -> File.dir?(Path.join(emoji_dir_path, file)) end) + packs = grouped[true] || [] files = grouped[false] || []