mirror of
https://github.com/rpm-software-management/tito.git
synced 2025-02-23 20:22:46 +00:00
Make checksum calculations for tar headers encoding aware.
This commit is contained in:
parent
fb0d60cd6b
commit
f3f243adb1
1 changed files with 2 additions and 2 deletions
|
@ -225,8 +225,8 @@ class TarFixer(object):
|
|||
|
||||
new_chksum = 0
|
||||
for val in values:
|
||||
for x in val:
|
||||
new_chksum += ord(x)
|
||||
val_bytes = bytearray(val, 'ASCII')
|
||||
new_chksum += reduce(lambda x, y: x + y, val_bytes, 0)
|
||||
for blank in " " * 8:
|
||||
new_chksum += ord(blank)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue