-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
improve higher level file system functions to avoid error.NameTooLong when possible #4812
Comments
I experimented with this and found it to be fact - for example the Linux kernel itself will give You can have paths that cannot be accessed with an absolute pathname, because the syscall will reject it, and still access them if you use syscalls based on directory handles. This is one reason zig's std lib has been transitioning to use directory handles for relevant operations. The article says it could be a
Admittedly I did all my testing on ext4/linux with default kernel parameters, however, I'd like to see evidence / a demonstration of this before proceeding further. |
Oops, I misunderstood that the entire article was on this topic and so only read 1 heading. Now I finished reading the article, and it says:
This is what I already believed to be true, and it means zig's Now I will say that some std lib abstractions (the ones higher level than |
It's not entirely clear to me what change you want here. If something passes a path to an operating system, it is possible to get Is this just about The bigger problem that I saw this issue being about was the fact that the name |
List of TODOs (marked with TODO(#4812) in code):
I suspect that the workaround of getCwdAlloc of #4837 is usable, but symlink resolving requires some complexity. And abit more complexity for the fast-path check (absolute path). test case canonicalize https://gist.github.com/matu3ba/1fd6bc69dc85705ffaed58363bdbb76e |
_Originally posted by @daurnimator in #4811
Originally posted by @andrewrk in #4811 (comment)
The text was updated successfully, but these errors were encountered: