Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions Lib/tarfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -1213,11 +1213,7 @@ def _create_gnu_long_header(cls, name, type, encoding, errors):
"""
name = name.encode(encoding, errors) + NUL

info = {}
info["name"] = "././@LongLink"
info["type"] = type
info["size"] = len(name)
info["magic"] = GNU_MAGIC
info = {"name": "././@LongLink", "type": type, "size": len(name), "magic": GNU_MAGIC}

# create extended header + name blocks.
return cls._create_header(info, USTAR_FORMAT, encoding, errors) + \
Expand Down Expand Up @@ -1264,11 +1260,7 @@ def _create_pax_generic_header(cls, pax_headers, type, encoding):

# We use a hardcoded "././@PaxHeader" name like star does
# instead of the one that POSIX recommends.
info = {}
info["name"] = "././@PaxHeader"
info["type"] = type
info["size"] = len(records)
info["magic"] = POSIX_MAGIC
info = {"name": "././@PaxHeader", "type": type, "size": len(records), "magic": POSIX_MAGIC}

# Create pax header + record blocks.
return cls._create_header(info, USTAR_FORMAT, "ascii", "replace") + \
Expand Down
Loading