diff options
author | Ekaterina Vaartis <vaartis@cock.li> | 2019-09-01 15:38:45 +0300 |
---|---|---|
committer | Ekaterina Vaartis <vaartis@cock.li> | 2019-09-19 00:16:33 +0300 |
commit | 13cd93a0d314238427c217ec0ab8f59f329321f5 (patch) | |
tree | a8b9301decd9154ab7afcf073b4e0c9e97fb1131 /lib | |
parent | f5131540dc9bbf8038e6625f4524ca01b52abbbf (diff) | |
download | pleroma-13cd93a0d314238427c217ec0ab8f59f329321f5.tar.gz |
Use && insted of "and" for checking shared-files for packs
share-files can be nil and "and" does not like that
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/emoji_api/emoji_api_controller.ex | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pleroma/web/emoji_api/emoji_api_controller.ex b/lib/pleroma/web/emoji_api/emoji_api_controller.ex index 0bd9cd207..f34a4e08c 100644 --- a/lib/pleroma/web/emoji_api/emoji_api_controller.ex +++ b/lib/pleroma/web/emoji_api/emoji_api_controller.ex @@ -64,7 +64,7 @@ defmodule Pleroma.Web.EmojiAPI.EmojiAPIController do # If the pack is set as shared, check if it can be downloaded # That means that when asked, the pack can be packed and sent to the remote # Otherwise, they'd have to download it from external-src - pack["pack"]["share-files"] and + pack["pack"]["share-files"] && Enum.all?(pack["files"], fn {_, path} -> File.exists?(Path.join(pack_path, path)) end) |