mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-22 06:36:16 +00:00
correct minor zip behaviour
This commit is contained in:
parent
fbb13fde76
commit
bee10eab5e
|
@ -125,7 +125,7 @@ defmodule Pleroma.Emoji.Pack do
|
||||||
{:ok, _emoji_files} =
|
{:ok, _emoji_files} =
|
||||||
:zip.unzip(
|
:zip.unzip(
|
||||||
to_charlist(file.path),
|
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} =
|
{_, updated_pack} =
|
||||||
|
|
|
@ -64,7 +64,7 @@ defmodule Pleroma.Emoji.PackTest do
|
||||||
path: Path.absname("test/instance_static/emoji/test_pack/blank.png")
|
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
|
end
|
||||||
|
|
||||||
test "returns pack when zip file is empty", %{pack: pack} do
|
test "returns pack when zip file is empty", %{pack: pack} do
|
||||||
|
|
Loading…
Reference in a new issue