From 30907977a72e30230159f2583eb781ac8805f564 Mon Sep 17 00:00:00 2001 From: FTS Date: Thu, 19 Sep 2024 06:23:56 +0800 Subject: [PATCH] convert `dest_path` to chatlist when unzip fixes https://github.com/jsonkenl/xlsxir/issues/128 --- lib/xlsxir/unzip.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/xlsxir/unzip.ex b/lib/xlsxir/unzip.ex index 6d4fb40..6c6d777 100644 --- a/lib/xlsxir/unzip.ex +++ b/lib/xlsxir/unzip.ex @@ -151,7 +151,7 @@ defmodule Xlsxir.Unzip do end defp extract_from_zip(path, file_list, :memory), do: :zip.extract(path, [{:file_list, file_list}, :memory]) - defp extract_from_zip(path, file_list, {:file, dest_path}), do: :zip.extract(path, [{:file_list, file_list}, {:cwd, dest_path}]) + defp extract_from_zip(path, file_list, {:file, dest_path}), do: :zip.extract(path, [{:file_list, file_list}, {:cwd, to_charlist(dest_path)}]) defp build_xml_files(files_list) do files_list