git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git-archive loses path info when opened with Winzip?

From
RDRogan Dawes <lists@dawes.za.net>
Date
Mar 31, 2008, 20:09 UTC
Message-ID
<47F144E9.2040709@dawes.za.net>
In-Reply-To
<47F13FCE.1010502@lsrfire.ath.cx>
René Scharfe wrote:
Show 21 quoted lines
> Rogan Dawes schrieb:
>> Hi folks,
>>
>> I have noticed something strange with "git-archive"-created tarballs. It
>> seems that Winzip has trouble parsing the paths for certain files
>> correctly.
>>
>> The symptom is that Winzip shows some files as having been created at
>> the "top level" of the zip, without any path at all, while the rest of
>> the files are within their correct directory structure.
>>
>> I have attached a screenshot of a gitweb-created snapshot opened in
>> Winzip 9.0 SR1 (build 6224), but it apparently happens in other (more
>> recent) versions of Winzip as well.
> 
> Oh, well.
> 
> Each file in a tar archive has at least a 512-byte header.  This header
> contains a name field, 100 bytes long.  When it became clear that it
> would be nice to support file names longer than 100 characters, another
> 155 bytes in the header was designated as a prefix field (see tar.h).
[snip]
Show 9 quoted lines
> In any case, there are better options:
> 
>   - Don't use long file names (just kidding :).
>   - Use a tar extractor that understands the prefix field, e.g. 7-Zip.
>   - Use zip (but beware of its 65535 bytes name length limit! ;).
>   - File a bug report with WinZip.
> 
> René
> 
Hi René,

Thanks for the detailed explanation. I guess I should file a bug report with WinZip, although that won't solve the problem for most of the population.

My best bet seems to be to provide the option to create Zip files rather than tarballs (i.e. upgrade my gitweb.cgi to something more recent).

Regards,
Rogan
Previous: René Scharfe
Message 3 of 3 in “git-archive loses path info when opened with Winzip?”
  1. Rogan DawesMar 31, 2008
  2. René ScharfeMar 31, 2008
  3. Rogan DawesMar 31, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.