Repository navigation
Handle filesystem roots in DirFileSystem path translation - #2290
Open
zhechen-cs wants to merge 1 commit into
Open
zhechen-cs wants to merge 1 commit into
zhechen-cs wants to merge 1 commit into
Conversation
Comment on lines
+84
to
+85
| if self.path.endswith(self.fs.sep): | ||
| path = path.lstrip(self.fs.sep) |
Member
There was a problem hiding this comment.
Isn't this wrong? Since we join on sep, shouldn't path always be lstrip-ped?
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DirFileSystem rooted at a local filesystem root can raise AssertionError when listing that root. Root path joining and relative-name stripping both add a separator to a prefix that already ends with one; POSIX double-leading-slash normalization can also make leading-slash and ordinary relative queries disagree.
Join root prefixes with one separator and use the same prefix when returning relative paths. Preserve existing subtree behavior and trailing-slash copy semantics. Add POSIX/drive-root path cases for synchronous/asynchronous wrappers and real local ls(), info(), find() and glob() checks with both forms of the query path.
Validation on macOS arm64 / CPython 3.12.13, independently based on upstream 8cf902e:
The suite emits the same multiprocessing fork deprecation warning on the baseline and patch. Native Windows, cloud, FUSE and downstream matrices were not run locally. A changelog entry is included.