correct minor zip behaviour

This commit is contained in:
Floatingghost 2024-10-26 06:11:12 +01:00
parent fbb13fde76
commit bee10eab5e
2 changed files with 2 additions and 2 deletions

View file

@ -125,7 +125,7 @@ defmodule Pleroma.Emoji.Pack do
{:ok, _emoji_files} =
:zip.unzip(
to_charlist(file.path),
[{:file_list, Enum.map(emojies, & &1[:path])}, {:cwd, tmp_dir}]
[{:file_list, Enum.map(emojies, & &1[:path])}, {:cwd, to_charlist(tmp_dir)}]
)
{_, updated_pack} =

View file

@ -64,7 +64,7 @@ defmodule Pleroma.Emoji.PackTest do
path: Path.absname("test/instance_static/emoji/test_pack/blank.png")
}
assert Pack.add_file(pack, nil, nil, file) == {:error, :einval}
assert Pack.add_file(pack, nil, nil, file) == {:error, :bad_eocd}
end
test "returns pack when zip file is empty", %{pack: pack} do