From fb6c3d840ef118d9f6b34c00cbef8f6f7c2d0e96 Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 27 Nov 2018 22:41:14 +0800 Subject: improve tar on windows --- xmake/modules/utils/archive/extract.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 -- cgit v1.3.1