diff --git a/lib/pleroma/emoji/pack.ex b/lib/pleroma/emoji/pack.ex index 142208854..e95320a07 100644 --- a/lib/pleroma/emoji/pack.ex +++ b/lib/pleroma/emoji/pack.ex @@ -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} = diff --git a/test/pleroma/emoji/pack_test.exs b/test/pleroma/emoji/pack_test.exs index f5d2e2eef..3843add13 100644 --- a/test/pleroma/emoji/pack_test.exs +++ b/test/pleroma/emoji/pack_test.exs @@ -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