diff options
author | Adam Harrison <adamdharrison@gmail.com> | 2023-08-18 09:12:46 -0400 |
---|---|---|
committer | Adam Harrison <adamdharrison@gmail.com> | 2023-08-18 09:12:46 -0400 |
commit | 5c6c296680b3dcfbd5c6e211b78e4659e59fe623 (patch) | |
tree | f616eb7727d95f422aeb8a7249995e8439858228 /src/lpm.lua | |
parent | 6bcc10e083a050d27af480b0e81510d1d1527b15 (diff) | |
download | lite-xl-plugin-manager-5c6c296680b3dcfbd5c6e211b78e4659e59fe623.tar.gz lite-xl-plugin-manager-5c6c296680b3dcfbd5c6e211b78e4659e59fe623.zip |
Allowed for extracting of .gz files without an associated tar.
Diffstat (limited to 'src/lpm.lua')
-rw-r--r-- | src/lpm.lua | 4 |
1 files changed, 2 insertions, 2 deletions
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------- |