This commit is contained in:
Igor Timofeev
2017-01-22 11:26:47 +03:00
parent d818e874dd
commit 9b18c6b187
3 changed files with 8 additions and 3 deletions

View File

@@ -21,6 +21,7 @@ local function byteArrayToNumber(byteArray)
end
return number
end
------------------------------------------------------------------------------------------------------------------
local function writePath(compressedFile, path)
@@ -66,8 +67,8 @@ end
local function doCompressionRecursively(fileList, compressedFile, currentPackPath)
for file = 1, #fileList do
local filename = fs.name(fileList[file])
local filePackPath = currentPackPath .. fs.name(fileList[file])
local filename = (fs.name(fileList[file]) or "")
local filePackPath = currentPackPath .. filename
if filename ~= "mnt" and filename ~= ".DS_Store" then
-- print("Локальный путь архива: " .. filePackPath)
@@ -182,6 +183,10 @@ function compressor.unpack(pathToCompressedFile, pathWhereToUnpack)
compressedFile:close()
end
function compressor.packAll(pathToCompressedFile)
compressor.pack(pathToCompressedFile, getFileList("/"))
end
------------------------------------------------------------------------------------------------------------------
-- compressor.pack("/test1.pkg", "/MineOS/System/OS/", "/etc/")