-
Notifications
You must be signed in to change notification settings - Fork 136
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
bug: render of folder cointaining OneDrive folder fails on Windows #535
Comments
Unfortunately I have neither OneDrive nor a Windows computer right now. I won't be able to help debug this. |
Alright. I did some more digging and found out the following:
|
Interesting, so it seems like the issue is that we can't list a directory that is a reparse point? I don't know if those would show up as type "link" or as a normal directory, but perhaps the error happens when we're trying to read the link data. |
I also have this issue. I don't think it's related with the There is also another error reported when this issue occurs like
I think the problem happens when some code dealing with path like |
Not all
I can't confirm this. I've been using Oil in neovim on a Windows machine for well over a year now and never ran into this problem. |
I think I understand this a bit better now from looking in the docs again. There is no such thing as a file being a Reparse Point. It's more like that the file has a Reparse Point. And the Reparse Point is data specific to a File System Filter, plus an identifier which File System Filter to use. So likely whatever oil is using on Windows to "stat" the file, needs to be told to use the appropriate File System Filter. That same "stat" is likely what is throwing the |
I have debugged oil with one-small-step-for-vimkind, and located the issue. The error is indeed reported by It should be better to render the rest entries in path, and mark the bad entry. |
FYI, libuv seems has lots of issue regarding OneDrive on windows libuv/libuv#2348 |
So |
@stevearc I have tried use |
I think that comes back to what I found out earlier. Every symlink on Windows is also a Reparse Point, but not every Reparse Point is a symlink. It might be that your check is too wide. |
The change we want to make is probably going to live here oil.nvim/lua/oil/adapters/files.lua Lines 311 to 335 in c6a39a6
But how we want to do it depends on what information we can get. Did you find a way to detect this kind of link-that-will-fail-readlink ahead of time, or are we going to have to handle the error?
Our check is just "does the fs_readdir call return a type = |
In my testing, when |
But, when I test with nodejs which is actually also using libuv to operate filesystem, its |
You could probably limit the additional check to only run on Windows, if that improves performance. |
Did you check the docs and existing issues?
Neovim version (nvim -v)
v0.11.0-dev-1335+g3f1d09bc94
Operating system/version
Windows 11 Enterprise 23H2 22631.4602
Describe the bug
In my home folder on Windows on my work machine, there's a OneDrive folder that causes oil to fail to render my home folder. I get this error notification:
I have no idea what makes this folder special enough to fail. The folder properties don't look special to me and yazi is able to render my home folder no problem. I can also explore inside that OneDrive folder with oil without problems. This really only occurs when trying to render the OneDrive folder.
Also when I navigate to my Windows home folder from inside my WSL instance, oil is able to render my home folder without problems as well.
What is the severity of this bug?
tolerable (can work around it)
Steps To Reproduce
Error: EINVAL: invalid argument: C:\Users\KaiMoschcau\\OneDrive - blecon GmbH
Expected Behavior
Oil should render the buffer as normal and allow me to move through my home folder.
Directory structure
Here's some yazi output of the folder structure for context. The folder
OneDrive - blecon GmbH
in the middle column is the selected one.Repro
Did you check the bug with a clean config?
nvim -u repro.lua
using the repro.lua file above.The text was updated successfully, but these errors were encountered: