-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
MultiplexedPath only traverses first directory #265
Comments
Agreed, Do you have any interest in developing the fix (as a pull request), including tests to capture the missed expectation? |
Sure! My only worry was that my implementation is based on a previous structure of |
jaraco
changed the title
Possible bug in MultiplexedPath with partially overlapping subdirectory structure
MultiplexedPath only traverses first directory
Feb 6, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I ran into the following issue while trying to update my MultiplexedPath example in #264 to the current structure. Let's say you have the following path structure:
If you combine
data01
anddata02
in aMultiplexedPath
,data01/x
will make it impossible to finddata02/x/y
, see the following example:In this case if you do:
this will give
data01/x/y
instead ofdata02/x/y
, andwill raise a
FileNotFoundError
.The reason for this is that in
Traversable.joinpath()
, only the first path segment is used to search for a match:and then, only the first match is returned:
The solution to this problem could be related to the suggestion in #264, unless returning
MultiplexedPath
s isn't the desired behaviour ofMultiplexedPath.joinpath()
.The text was updated successfully, but these errors were encountered: