fix(avante/path): incorrect handle of windows path (#522)
Signed-off-by: Hanchin Hsieh <me@yuchanns.xyz>
This commit is contained in:
parent
158170f9ed
commit
e55f9f753f
@ -76,6 +76,7 @@ N.get = function(bufnr)
|
|||||||
|
|
||||||
-- get root directory of given bufnr
|
-- get root directory of given bufnr
|
||||||
local directory = Path:new(Utils.root.get({ buf = bufnr }))
|
local directory = Path:new(Utils.root.get({ buf = bufnr }))
|
||||||
|
if Utils.get_os_name() == "windows" then directory = Path:new(directory:absolute():gsub("^%a:", "")[1]) end
|
||||||
---@cast directory Path
|
---@cast directory Path
|
||||||
---@type Path
|
---@type Path
|
||||||
local cache_prompt_dir = P.cache_path:joinpath(directory)
|
local cache_prompt_dir = P.cache_path:joinpath(directory)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user