From: Jeff King Date: Tue, 21 Jun 2016 21:04:54 GMT Subject: Re: [PATCH 1/2] archive-tar: write extended headers for file sizes >= 8GB Message-ID: <20160621210454.GC4747@sigill.intra.peff.net> In-Reply-To: <5769AA47.4020806@web.de> On Tue, Jun 21, 2016 at 10:57:43PM +0200, René Scharfe wrote: > Am 21.06.2016 um 22:42 schrieb René Scharfe: > > The value 120 is magic; we need it to pass the tests. That's > > because prepare_header() is used for building extended header > > records as well and we don't create extended headers for extended > > headers (not sure if that would work anyway), so they simply > > vanish when they're over the limit as their size field is set to > > zero. > > So how about something like this to make sure extended headers are > only written for regular files and not for other extended headers? This is quite similar to what I wrote originally, but I moved to the ustar_size() format to better match the mtime code (which needs something like that, because we pass around args->time). I think you could drop ustar_size() completely here and just put the "if" into write_tar_entry(). -Peff