Skip to content

Commit

Permalink
Add filter for combinations
Browse files Browse the repository at this point in the history
  • Loading branch information
zacksiri committed Mar 13, 2024
1 parent b7ef82e commit 2b3298e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/icepak/item.ex
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ defmodule Icepak.Item do
|> finalize_hash()

combined_hashes =
Enum.map(@combinations, fn {key, values} ->
@combinations
|> Enum.filter(fn {_name, values} ->
Enum.all?(values, fn f -> File.exists?(Path.join(base_path, f)) end)
end)
|> Enum.map(fn {key, values} ->
files = Enum.map(values, fn f -> Path.join(base_path, f) end)

%{
Expand Down

0 comments on commit 2b3298e

Please sign in to comment.