• Joe Tsai's avatar
    archive/tar: make Reader handle GNU format properly · d2aa8601
    Joe Tsai authored
    The GNU format does not have a prefix field, so we should make
    no attempt to read it. It does however have atime and ctime fields.
    Since Go previously placed incorrect values here, we liberally
    read the atime and ctime fields and ignore errors so that old tar
    files written by Go can at least be partially read.
    
    This fixes half of #12594. The Writer is much harder to fix.
    
    Updates #12594
    
    Change-Id: Ia32845e2f262ee53366cf41dfa935f4d770c7a30
    Reviewed-on: https://go-review.googlesource.com/31444
    Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    d2aa8601
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...