commit | ee23f4bba73f704b59c590a94b4731a22b72c7e7 | [log] [tgz] |
---|---|---|
author | Georg Brandl <georg@python.org> | Tue Oct 24 16:54:23 2006 +0000 |
committer | Georg Brandl <georg@python.org> | Tue Oct 24 16:54:23 2006 +0000 |
tree | 4f7d0e6391ef87221e16a1d29534bbe4592d9dcd | |
parent | 920fa6a102f8d5f46a2e0552e85ae295882a92bb [diff] [blame] |
Patch [ 1583506 ] tarfile.py: 100-char filenames are truncated (backport from rev. 52431)
diff --git a/Lib/tarfile.py b/Lib/tarfile.py index 8d5f021..7c140da 100644 --- a/Lib/tarfile.py +++ b/Lib/tarfile.py
@@ -136,7 +136,7 @@ def stn(s, length): """Convert a python string to a null-terminated string buffer. """ - return s[:length-1] + (length - len(s) - 1) * NUL + NUL + return s[:length] + (length - len(s)) * NUL def nti(s): """Convert a number field to a python number.