[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tar --unlink-first
From: |
jkb |
Subject: |
Re: Tar --unlink-first |
Date: |
3 May 2001 11:23:06 GMT |
In <address@hidden> address@hidden writes:
> GNU tar (1.13) doesn't seem to honour the --unlink-first.
Further to the above, having looked at the code, I now have the following
prelimary patch to 1.13:
*** extract.c.orig Thu May 3 12:03:07 2001
--- extract.c Thu May 3 12:18:08 2001
***************
*** 841,846 ****
--- 841,849 ----
while (name_length && CURRENT_FILE_NAME[name_length] == '/')
CURRENT_FILE_NAME[name_length--] = '\0';
+ if (unlink_first_option)
+ remove_any_file (CURRENT_FILE_NAME, recursive_unlink_option);
+
if (incremental_option)
{
/* Read the entry and delete files that aren't listed in the
Basically it just adds the unlink_first_option check to DIRTYPE extraction
too. This seems to work for me. Indeed I cannot work out the reason for having
a recursive_unlink_option if directories did not check for unlink-first.
I'll send this to address@hidden too.
James
--
James Bonfield (address@hidden) Tel: 01223 402499 Fax: 01223 213556
Medical Research Council - Laboratory of Molecular Biology,
Hills Road, Cambridge, CB2 2QH, England.
Also see Staden Package WWW site at http://www.mrc-lmb.cam.ac.uk/pubseq/