[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-tar] tar with -k option no longer warns when not overwriting files
From: |
Doug McLaren |
Subject: |
[Bug-tar] tar with -k option no longer warns when not overwriting files |
Date: |
Wed, 16 Nov 2011 22:54:33 -0600 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
I just got surprised by a change in tar behavior ...
With a recent version (1.23, 1.26) of tar :
% touch foo
% tar -cvf foo.tar foo
foo
% tar -kxvf foo.tar
foo
% tar --warning=all -kxvf foo.tar
foo
% tar --warning=all --keep-old-files -xvvvf foo.tar
-rw-r--r-- dougmc/local 0 2011-11-16 22:43 foo
{ --warning=all is the default according to the docs, but I just made sure }
With an old version (1.20) of tar :
% touch foo
% tar -cvf foo.tar foo
% tar -cvf foo.tar foo
foo
% tar -kxvf foo.tar
foo
tar: foo: Cannot open: File exists
tar: Error exit delayed from previous errors
Looking at the Changelog --
2009-05-14 Sergey Poznyakoff <address@hidden>
Do not issue errors on existing files when given the -k option
... so this is intentional, and it makes sense -- an error probably
isn't appropriate. But no message at all?
I would propose that if a file is not put down due to it already
existing and the -k / --keep-old-files flag being given, that a
warning should be thrown. (Really, it's more of an informational
message, but the logging mechanism isn't that fancy.)
--
Doug McLaren, address@hidden
- [Bug-tar] tar with -k option no longer warns when not overwriting files,
Doug McLaren <=