summaryrefslogtreecommitdiff
path: root/Lib/zipfile.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2019-07-07 17:37:50 -0400
committerGitHub <noreply@github.com>2019-07-07 17:37:50 -0400
commit38f44b4a4adc37e8f5f8971917d8b3145f351a56 (patch)
treea37b1db09d407bbe909198f1df79429cc0cb1217 /Lib/zipfile.py
parentf6cdd3ff687ebbf8209d793a18a042ea495c4aeb (diff)
downloadcpython-git-38f44b4a4adc37e8f5f8971917d8b3145f351a56.tar.gz
bpo-37520: Correct behavior for zipfile.Path.parent (GH-14638)
* bpo-37520: Correct behavior for zipfile.Path.parent * 📜🤖 Added by blurb_it.
Diffstat (limited to 'Lib/zipfile.py')
-rw-r--r--Lib/zipfile.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/zipfile.py b/Lib/zipfile.py
index 62f2fd27d3..3c1f123503 100644
--- a/Lib/zipfile.py
+++ b/Lib/zipfile.py
@@ -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)