Skip to content

Commit e85ddc5

Browse files
committed
tweak Hex.unpack_taball considering new change to hex_core (using atom :all_files instead of empty list for unpacking all files)
1 parent 50f290f commit e85ddc5

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

lib/diff/hex/hex.ex

+10-2
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,17 @@ defmodule Diff.Hex do
3838
end
3939
end
4040

41-
def unpack_tarball(tarball, file_list \\ [], path) when is_binary(path) do
42-
path = to_charlist(path)
41+
def unpack_tarball(tarball, path) when is_binary(path) do
42+
do_unpack_tarball(tarball, :all_files, path)
43+
end
44+
45+
def unpack_tarball(tarball, file_list, path) when is_binary(path) do
4346
file_list = Enum.map(file_list, &to_charlist/1)
47+
do_unpack_tarball(tarball, file_list, path)
48+
end
49+
50+
def do_unpack_tarball(tarball, file_list, path) do
51+
path = to_charlist(path)
4452

4553
with {:ok, _} <- :hex_tarball.unpack(tarball, file_list, path) do
4654
:ok

0 commit comments

Comments
 (0)