diff options
| author | ruki <[email protected]> | 2021-03-02 00:32:14 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-03-02 00:32:14 +0800 |
| commit | 8f0fee2899d3fdbca259f32acb068b3a4a45bec6 (patch) | |
| tree | 5810513c8ffd13fcced87dbfecbbf6b0bb1b8497 /xmake/core/base/path.lua | |
| parent | cbaf212c6befb4e8974aa49be12a99a9fe316f46 (diff) | |
improve to find_7z and add bzip2
Diffstat (limited to 'xmake/core/base/path.lua')
| -rw-r--r-- | xmake/core/base/path.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/xmake/core/base/path.lua b/xmake/core/base/path.lua index 494961c09..aa0cd571a 100644 --- a/xmake/core/base/path.lua +++ b/xmake/core/base/path.lua @@ -197,5 +197,15 @@ function path.pattern(pattern) return pattern end +-- get cygwin-style path on msys2/cygwin, e.g. "c:\xxx" -> "/c/xxx" +function path.cygwin_path(p) + p = p:gsub("\\", "/") + local pos = p:find(":/") + if pos == 2 then + return "/" .. p:sub(1, 1) .. p:sub(3) + end + return p +end + -- return module: path return path |
