summaryrefslogtreecommitdiff
path: root/xmake/modules/utils/archive
diff options
context:
space:
mode:
authorruki <[email protected]>2024-04-10 22:42:38 +0800
committerruki <[email protected]>2024-04-10 22:42:38 +0800
commitbcc361fcee9277dedfdcdd031d058c4de5322c73 (patch)
treeea5e455e50257e5cf5871846596c68dd80ee8995 /xmake/modules/utils/archive
parent3270e053705de1df51abda4fa56faee6888d9295 (diff)
fix archive
Diffstat (limited to 'xmake/modules/utils/archive')
-rw-r--r--xmake/modules/utils/archive/archive.lua8
-rw-r--r--xmake/modules/utils/archive/extract.lua8
2 files changed, 4 insertions, 12 deletions
diff --git a/xmake/modules/utils/archive/archive.lua b/xmake/modules/utils/archive/archive.lua
index 59933ae68..f91aa9d7f 100644
--- a/xmake/modules/utils/archive/archive.lua
+++ b/xmake/modules/utils/archive/archive.lua
@@ -296,7 +296,7 @@ function _archive(archivefile, inputfiles, extension, archivers, opt)
}
}
if ok then
- return
+ return true
end
end
raise("cannot archive %s, %s!", path.filename(archivefile), errors or "archivers not found!")
@@ -319,12 +319,8 @@ end
-- @param options the options, e.g.. {curdir = "/tmp", recurse = true, compress = "fastest|faster|default|better|best", excludes = {"*/dir/*", "dir/*"}}
--
function main(archivefile, inputfiles, opt)
-
- -- init inputfiles
- inputfiles = inputfiles or os.curdir()
-
- -- init options
opt = opt or {}
+ inputfiles = inputfiles or os.curdir()
if opt.recurse == nil then
opt.recurse = true
end
diff --git a/xmake/modules/utils/archive/extract.lua b/xmake/modules/utils/archive/extract.lua
index b046dafd4..604899300 100644
--- a/xmake/modules/utils/archive/extract.lua
+++ b/xmake/modules/utils/archive/extract.lua
@@ -388,7 +388,7 @@ function _extract(archivefile, outputdir, extension, extractors, opt)
}
}
if ok then
- return
+ return true
end
end
raise("cannot extract %s, %s!", path.filename(archivefile), errors or "extractors not found!")
@@ -401,12 +401,8 @@ end
-- @param options the options, e.g.. {excludes = {"*/dir/*", "dir/*"}}
--
function main(archivefile, outputdir, opt)
-
- -- init outputdir
- outputdir = outputdir or os.curdir()
-
- -- init options
opt = opt or {}
+ outputdir = outputdir or os.curdir()
-- init extractors
local extractors