• René Scharfe's avatar
    archive-zip: write extended timestamp · 227bf598
    René Scharfe authored
    File modification times in ZIP files are encoded in DOS format: local
    time with a granularity of two seconds.  Add an extra field to all
    archive entries to also record the mtime in Unix' fashion, as UTC with
    a granularity of one second.
    
    This has the desirable side-effect of convincing Info-ZIP unzip 6.00
    to respect general purpose flag 11, which is used to indicate that a
    file name is encoded in UTF-8.  Any extra field would do, actually,
    but the extended timestamp is a reasonably small one (22 bytes per
    entry).  Archives created by Info-ZIP zip 3.0 contain it, too (but
    with ctime and atime as well).
    Signed-off-by: default avatarRene Scharfe <rene.scharfe@lsrfire.ath.cx>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    227bf598
archive-zip.c 12.4 KB