[Python-checkins] python/dist/src/Lib tarfile.py,1.11,1.12

nnorwitz at users.sourceforge.net nnorwitz at users.sourceforge.net
Tue Jul 20 23:54:20 CEST 2004


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9308/Lib

Modified Files:
	tarfile.py 
Log Message:
SF #846659, fix bufsize violation and GNU longname/longlink extensions

Index: tarfile.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/tarfile.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** tarfile.py	10 Jul 2004 22:02:11 -0000	1.11
--- tarfile.py	20 Jul 2004 21:54:17 -0000	1.12
***************
*** 354,358 ****
              if self.type != "tar":
                  self.buf += self.cmp.flush()
-             self.__write("")            # Write remaining blocks to output
              self.fileobj.write(self.buf)
              self.buf = ""
--- 354,357 ----
***************
*** 1776,1779 ****
--- 1775,1780 ----
             which contain the longname as a null terminated string.
          """
+         name += NUL
+ 
          tarinfo = TarInfo()
          tarinfo.name = "././@LongLink"
***************
*** 1784,1787 ****
--- 1785,1789 ----
          # write extended header
          self.fileobj.write(tarinfo.tobuf())
+         self.offset += BLOCKSIZE
          # write name blocks
          self.fileobj.write(name)



More information about the Python-checkins mailing list