diff options
| author | ruki <[email protected]> | 2018-11-27 22:41:14 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-11-27 10:07:29 +0800 |
| commit | fb6c3d840ef118d9f6b34c00cbef8f6f7c2d0e96 (patch) | |
| tree | 421f486645aae0ebd2f6194569d3849030c5f85c | |
| parent | e3f4c5e5c21df7c7fe0246572f58f9f79dda2cbb (diff) | |
improve tar on windows
| -rw-r--r-- | xmake/modules/utils/archive/extract.lua | 8 |
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 |
