Fix git icons on files and folders in subfolders (#911)

This commit is contained in:
Alexandr Makurin
2022-01-31 11:06:36 +03:00
committed by GitHub
parent 6eebc10ed8
commit af3337879d

View File

@@ -8,6 +8,10 @@ function Runner:_parse_status_output(line)
local status = line:sub(1, 2) local status = line:sub(1, 2)
-- removing `"` when git is returning special file status containing spaces -- removing `"` when git is returning special file status containing spaces
local path = line:sub(4, -2):gsub('^"', ''):gsub('"$', '') local path = line:sub(4, -2):gsub('^"', ''):gsub('"$', '')
-- replacing slashes if on windows
if vim.fn.has('win32') == 1 then
path = path:gsub('/', '\\')
end
if #status > 0 and #path > 0 then if #status > 0 and #path > 0 then
self.output[utils.path_remove_trailing(utils.path_join({self.project_root,path}))] = status self.output[utils.path_remove_trailing(utils.path_join({self.project_root,path}))] = status
end end