diff --git a/lua/avante/path.lua b/lua/avante/path.lua index 4327abe..ba21939 100644 --- a/lua/avante/path.lua +++ b/lua/avante/path.lua @@ -76,6 +76,7 @@ N.get = function(bufnr) -- get root directory of given 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 ---@type Path local cache_prompt_dir = P.cache_path:joinpath(directory)