[BusyBox] tar won't overwrite existing files

Glenn McGrath bug1 at optushome.com.au
Tue Nov 18 20:40:12 UTC 2003


On Tue, 18 Nov 2003 16:25:27 +0100
Steven Scholz <steven.scholz at imc-berlin.de> wrote:

> Hi there,
> 
> I noticed that busybox tar won't overwrite existing files when
> extracting.
> 
> Could we implement some of these features please:
> 
>    -k, --keep-old-files       don't replace existing files when
>    extracting
>        --overwrite            overwrite existing files when extracting
>    -U, --unlink-first         remove each file prior to extracting
>    over it
>        --recursive-unlink     empty hierarchies prior to extracting
>        directory
> 
> I'll need the "--overwrite" option.

This change in behaviour came about because i removed some extra unlink
statments that shouldnt be needed, but forgot to set the
ARCHIVE_EXTRACT_UNCONDITIONAL flag in tar.c to compensate. It is now
behaving with a default unlinking first, as it was a week or so ago.

Ive added the -k option.

--overwrite achieves the same end result as --unlink so i dont think we
need that.

We dont ucrrently support --recurse-unlink or --overwrite-dir, but i can
see it might be useful.


Glenn





More information about the busybox mailing list