mirror of
https://github.com/AR2000AR/openComputers_codes.git
synced 2025-09-06 21:51:14 +02:00
Fix [pm] /DATA folder left after installing package #17
This commit is contained in:
Binary file not shown.
@@ -221,7 +221,7 @@
|
|||||||
["libtar"] = {
|
["libtar"] = {
|
||||||
["manifestVersion"] = "1.0",
|
["manifestVersion"] = "1.0",
|
||||||
["package"] = "libtar",
|
["package"] = "libtar",
|
||||||
["version"] = "1.1.0",
|
["version"] = "1.1.1",
|
||||||
["name"] = "libtar",
|
["name"] = "libtar",
|
||||||
["repo"] = "tree/master/tar",
|
["repo"] = "tree/master/tar",
|
||||||
["description"] = "Librairy to extract and list the content of tar archive",
|
["description"] = "Librairy to extract and list the content of tar archive",
|
||||||
|
@@ -221,7 +221,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
["libtar"] = {
|
["libtar"] = {
|
||||||
version = "1.1.0",
|
version = "1.1.1",
|
||||||
name = "libtar",
|
name = "libtar",
|
||||||
repo = "tree/master/tar",
|
repo = "tree/master/tar",
|
||||||
description = "Librairy to extract and list the content of tar archive",
|
description = "Librairy to extract and list the content of tar archive",
|
||||||
|
@@ -251,10 +251,10 @@ function tar.list(filename)
|
|||||||
end
|
end
|
||||||
|
|
||||||
---Extract files that match filename `fineNameInArchive:match("^"..filename)
|
---Extract files that match filename `fineNameInArchive:match("^"..filename)
|
||||||
---@param tarname string
|
---@param tarname string Tar archive to work with
|
||||||
---@param filename? string|table
|
---@param filename? string|table file name patern to extract
|
||||||
---@param overwrite boolean overwrite existing files.
|
---@param overwrite boolean overwrite existing files.
|
||||||
---@param ignore? string|table
|
---@param ignore? string|table file name patern to ignore
|
||||||
---@param destdir string
|
---@param destdir string
|
||||||
---@param newRoot? string
|
---@param newRoot? string
|
||||||
function tar.extract(tarname, destdir, overwrite, filename, ignore, newRoot)
|
function tar.extract(tarname, destdir, overwrite, filename, ignore, newRoot)
|
||||||
@@ -286,6 +286,7 @@ function tar.extract(tarname, destdir, overwrite, filename, ignore, newRoot)
|
|||||||
if (name:match("^" .. fname)) then ok = false end
|
if (name:match("^" .. fname)) then ok = false end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
if (name == newRoot) then ok = false end
|
||||||
return ok
|
return ok
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -339,7 +340,7 @@ function tar.extract(tarname, destdir, overwrite, filename, ignore, newRoot)
|
|||||||
pathname = filesystem.canonical(pathname)
|
pathname = filesystem.canonical(pathname)
|
||||||
|
|
||||||
if header.typeflag == "directory" then
|
if header.typeflag == "directory" then
|
||||||
make_dir(pathname)
|
if (pathname ~= newRoot) then make_dir(pathname) end
|
||||||
elseif header.typeflag == "file" then
|
elseif header.typeflag == "file" then
|
||||||
local dirname = filesystem.path(pathname)
|
local dirname = filesystem.path(pathname)
|
||||||
if dirname ~= "" then
|
if dirname ~= "" then
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
["manifestVersion"] = "1.0",
|
["manifestVersion"] = "1.0",
|
||||||
["package"] = "libtar",
|
["package"] = "libtar",
|
||||||
["version"] = "1.1.0",
|
["version"] = "1.1.1",
|
||||||
["name"] = "libtar",
|
["name"] = "libtar",
|
||||||
["repo"] = "tree/master/tar",
|
["repo"] = "tree/master/tar",
|
||||||
["description"] = "Librairy to extract and list the content of tar archive",
|
["description"] = "Librairy to extract and list the content of tar archive",
|
||||||
|
Reference in New Issue
Block a user