-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lookup: handle // and trailing slash components correctly
When we hit empty components, we need to treat them as though they are a "." component. We could skip them for non-trailing components but for trailing components it's critical to actually try to do the open so that we get openat2-like errors for non-directory states. For the single trailing slash case, it's simpler to implement it as a final "." open after we've done the other lookups (we could switch to using an array of path component like libpathrs does, but this is a simpler change). Signed-off-by: Aleksa Sarai <[email protected]>
- Loading branch information
Showing
3 changed files
with
126 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.