From 5c6c296680b3dcfbd5c6e211b78e4659e59fe623 Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Fri, 18 Aug 2023 09:12:46 -0400 Subject: Allowed for extracting of .gz files without an associated tar. --- src/lpm.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lpm.lua') diff --git a/src/lpm.lua b/src/lpm.lua index 1a118de..14cc724 100644 --- a/src/lpm.lua +++ b/src/lpm.lua @@ -857,9 +857,9 @@ function Addon:install(bottle, installing) else common.get(file.url, temporary_path, file.checksum, write_progress_bar) local basename = common.basename(target_path) - if basename:find("%.zip$") or basename:find("%.tar%.gz$") then + if basename:find("%.zip$") or basename:find("%.tar%.gz$") or basename:find("%.gz$") then log_action("Extracting file " .. basename .. " in " .. install_path) - system.extract(temporary_path, temporary_install_path) + system.extract(temporary_path, temporary_install_path .. (not basename:find("%.tar%.gz$") and basename:find("%.gz$") and (PATHSEP .. basename:gsub(".gz$", "")) or "")) os.remove(temporary_path) else if file.arch and file.arch ~= "*" then system.chmod(temporary_path, 448) end -- chmod any ARCH tagged file to rwx------- -- cgit v1.2.3