fix(attach): resolve error viewing fugitive trees (#1058)

This commit is contained in:
Ben Elan 2024-06-20 00:54:06 -07:00 committed by GitHub
parent 651d5ed082
commit 89a4dce7c9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -71,7 +71,7 @@ local function get_buf_path(bufnr)
dprintf("Fugitive buffer for file '%s' from path '%s'", path, file)
if path then
local realpath = uv.fs_realpath(path)
if realpath then
if realpath and vim.fn.isdirectory(realpath) == 0 then
return realpath, commit, true
end
end