From cb3258c863f7485551eb28474d60f12547019d34 Mon Sep 17 00:00:00 2001 From: lain Date: Fri, 7 Jun 2019 17:31:21 +0200 Subject: [PATCH] Emoji: Use full path to check if a file is a directory. --- lib/pleroma/emoji.ex | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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] || [] -- 2.45.2