-
Notifications
You must be signed in to change notification settings - Fork 777
fix(#2094): fix the path resolving in windows #2248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@yetone I have a confusion on the empty string path case, shouldn't it get it("should return empty string when no paths provided", function()
local result = utils.join_paths()
assert.equals("", result)
end) |
It feels like there is no standard answer to this question. |
|
will check it soon |
|
I think I find what the issue is — is your current buffer a directory (like the cwd)? I believe that when opening Avante from a directory buffer, it shouldn't be added to the selected files list. will try to draft a pr to fix it. |
|
@brewinski can you try this fix? |
|
Thanks @guanghechen for looking into this so quickly. Yes, #2254 change fixed the problem for me. :) |
* fix(yetone#2094): fix the path resolving in windows * fix test case * tweak test case







RC: The vim.fs.normalize will return a invalid filepath in windows like
C:\xxx\yyy\zzzThe new
avante.utils.pathmodule is modeled after Node.js'snode:pathAPI. I've been using this code in my personal Neovim configuration for over a year, and it has proven to be quite reliable for cross-platform path resolution and relative path handling.