fix: path separator on Windows
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
local WIN = ya.target_family() == "windows"
|
||||||
local PATS = {
|
local PATS = {
|
||||||
{ "[MT]", 6 }, -- Modified
|
{ "[MT]", 6 }, -- Modified
|
||||||
{ "[AC]", 5 }, -- Added
|
{ "[AC]", 5 }, -- Added
|
||||||
@@ -14,6 +15,7 @@ local function match(line)
|
|||||||
local path
|
local path
|
||||||
if signs:find(p[1]) then
|
if signs:find(p[1]) then
|
||||||
path = line:sub(4, 4) == '"' and line:sub(5, -2) or line:sub(4)
|
path = line:sub(4, 4) == '"' and line:sub(5, -2) or line:sub(4)
|
||||||
|
path = WIN and path:gsub("/", "\\") or path
|
||||||
end
|
end
|
||||||
if not path then
|
if not path then
|
||||||
elseif path:find("[/\\]$") then
|
elseif path:find("[/\\]$") then
|
||||||
|
|||||||
Reference in New Issue
Block a user