summaryrefslogtreecommitdiff
path: root/xmake/modules/utils/archive/extract.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2018-11-27 22:41:14 +0800
committerruki <[email protected]>2018-11-27 10:07:29 +0800
commitfb6c3d840ef118d9f6b34c00cbef8f6f7c2d0e96 (patch)
tree421f486645aae0ebd2f6194569d3849030c5f85c /xmake/modules/utils/archive/extract.lua
parente3f4c5e5c21df7c7fe0246572f58f9f79dda2cbb (diff)
improve tar on windows
Diffstat (limited to 'xmake/modules/utils/archive/extract.lua')
-rw-r--r--xmake/modules/utils/archive/extract.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/xmake/modules/utils/archive/extract.lua b/xmake/modules/utils/archive/extract.lua
index 6b2f5a69e..9e4908e8d 100644
--- a/xmake/modules/utils/archive/extract.lua
+++ b/xmake/modules/utils/archive/extract.lua
@@ -46,7 +46,13 @@ function _extract_using_tar(archivefile, outputdir, extension, opt)
end
-- init argv
- local argv = {option.get("verbose") and "-xvf" or "-xf", archivefile}
+ local argv = {}
+ if is_host("windows") then
+ -- force "x:\\xx" as local file
+ table.insert(argv, "--force-local")
+ end
+ table.insert(argv, option.get("verbose") and "-xvf" or "-xf")
+ table.insert(archivefile)
-- ensure output directory
if not os.isdir(outputdir) then