Emoji: Use full path to check if a file is a directory.

This commit is contained in:
lain 2019-06-07 17:31:21 +02:00
parent d5330ed125
commit cb3258c863
1 changed files with 3 additions and 1 deletions

View File

@ -98,7 +98,9 @@ defp load do
Logger.error("Could not access the custom emoji directory #{emoji_dir_path}: #{e}") Logger.error("Could not access the custom emoji directory #{emoji_dir_path}: #{e}")
{:ok, results} -> {: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] || [] packs = grouped[true] || []
files = grouped[false] || [] files = grouped[false] || []