mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
bpo-37520: Correct behavior for zipfile.Path.parent (GH-14638)
* bpo-37520: Correct behavior for zipfile.Path.parent * 📜🤖 Added by blurb_it.
This commit is contained in:
parent
f6cdd3ff68
commit
38f44b4a4a
3 changed files with 13 additions and 1 deletions
|
@ -2236,7 +2236,7 @@ class Path:
|
|||
|
||||
@property
|
||||
def parent(self):
|
||||
parent_at = posixpath.dirname(self.at)
|
||||
parent_at = posixpath.dirname(self.at.rstrip('/'))
|
||||
if parent_at:
|
||||
parent_at += '/'
|
||||
return self._next(parent_at)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue