forked from mirrors/akkoma
Use && insted of "and" for checking shared-files for packs
share-files can be nil and "and" does not like that
This commit is contained in:
parent
f5131540dc
commit
13cd93a0d3
1 changed files with 1 additions and 1 deletions
|
@ -64,7 +64,7 @@ defmodule Pleroma.Web.EmojiAPI.EmojiAPIController do
|
||||||
# If the pack is set as shared, check if it can be downloaded
|
# 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
|
# 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
|
# 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} ->
|
Enum.all?(pack["files"], fn {_, path} ->
|
||||||
File.exists?(Path.join(pack_path, path))
|
File.exists?(Path.join(pack_path, path))
|
||||||
end)
|
end)
|
||||||
|
|
Loading…
Reference in a new issue