bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-tar] Don't write empty archive if errors


From: Ed Avis
Subject: [Bug-tar] Don't write empty archive if errors
Date: Wed, 1 Aug 2012 11:46:21 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

If you run

   tar cf out.tar /nonexistent

then tar prints to stderr that /nonexistent does not exist, but nonetheless the
file out.tar is created as an empty archive.  It would be better to wait until
the first real file data is ready to be written out before creating the archive,
and if none of the input files can be read, refuse to create an empty archive.
This would involve buffering the ten kilobytes or so of header data and not
opening the output file until at least some real data is to be written to it.

-- 
Ed Avis <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]