[Zope-dev] Problem in tar.py

Jonas Thor jonas.thor at contactor.se
Mon Jan 12 11:10:23 EST 2004


There seems to be a problem in the functin oct12() in file
Packages/App/tar.py. The problem appears if you tries to add a file to a
tar archive which mtime is newer than Sat Jan 10 14:37:04 2004. Current
version of oct12() in tar.py:
<-- snip -->
def oct12(i):
    i=oct(i)
    return '0'*(11-len(i))+i+' '
<-- snip -->

Suggested changes:
<-- snip -->
def oct12(i):
    i=oct(i)

    if len(i) < 12:
        return '0'*(11-len(i))+i+' '
    else:
        return i[1:12]+' '
<-- snip -->


I've posted a issue to Zope Collector, 1177.

Cheers,

/jonas





More information about the Zope-Dev mailing list