• Joe Tsai's avatar
    archive/tar: convert Reader.Next to be loop based · b8a12928
    Joe Tsai authored
    Motivation for change:
    * Recursive logic is hard to follow, since it tends to apply
    things in reverse. On the other hand, the tar formats tend to
    describe meta headers as affecting the next entry.
    * Recursion also applies changes in the wrong order. Two test
    files are attached that use multiple headers. The previous Go
    behavior differs from what GNU and BSD tar do.
    
    Change-Id: Ic1557256fc1363c5cb26570e5d0b9f65a9e57341
    Reviewed-on: https://go-review.googlesource.com/14624
    Run-TryBot: Joe Tsai <joetsai@digital-static.net>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    b8a12928
Name
Last commit
Last update
..
gnu-multi-hdrs.tar Loading commit data...
gnu.tar Loading commit data...
hardlink.tar Loading commit data...
hdr-only.tar Loading commit data...
issue10968.tar Loading commit data...
issue11169.tar Loading commit data...
issue12435.tar Loading commit data...
neg-size.tar Loading commit data...
nil-uid.tar Loading commit data...
pax-multi-hdrs.tar Loading commit data...
pax-path-hdr.tar Loading commit data...
pax.tar Loading commit data...
small.txt Loading commit data...
small2.txt Loading commit data...
sparse-formats.tar Loading commit data...
star.tar Loading commit data...
ustar-file-reg.tar Loading commit data...
ustar.tar Loading commit data...
v7.tar Loading commit data...
writer-big-long.tar Loading commit data...
writer-big.tar Loading commit data...
writer.tar Loading commit data...
xattrs.tar Loading commit data...