diff --git a/Lib/tarfile.py b/Lib/tarfile.py --- a/Lib/tarfile.py +++ b/Lib/tarfile.py @@ -1297,7 +1297,7 @@ # the longname information. next.offset = self.offset if self.type == GNUTYPE_LONGNAME: - next.name = nts(buf) + next.name = nts(buf).rstrip("/") elif self.type == GNUTYPE_LONGLINK: next.linkname = nts(buf)