Emoji: Use full path to check if a file is a directory.
authorlain <lain@soykaf.club>
Fri, 7 Jun 2019 15:31:21 +0000 (17:31 +0200)
committerlain <lain@soykaf.club>
Fri, 7 Jun 2019 15:31:21 +0000 (17:31 +0200)
lib/pleroma/emoji.ex

index de7fcc1ce0c4f4412038291f740b729327ee794d..b77b26f7f375e8d148825fc9749c993c682e1abe 100644 (file)
@@ -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] || []