Skip to content
Snippets Groups Projects
Select Git revision
2 results Searching

cpython

  • Clone with SSH
  • Clone with HTTPS
  • user avatar
    Miss Islington (bot) authored and GitHub committed
    When a `_PathParents` object has a drive or a root, the length of the
    object is *one less* than than the length of `self._parts`, which resulted
    in an off-by-one error when `path.parents[-n]` was fed through to
    `self._parts[:-n - 1]`. In particular, `path.parents[-1]` was a malformed
    path object with spooky properties.
    
    This is addressed by adding `len(self)` to negative indices.
    (cherry picked from commit f32e6b48)
    
    Co-authored-by: default avatarBarney Gale <barney.gale@gmail.com>
    b382bf50
    History
    Name Last commit Last update