PR/31923: Sergey Svishchev: pax-as-tar ignores -k, overwrites existing files
Fix from Onno van der Linden
This commit is contained in:
parent
24f32d9b06
commit
c952ef6b81
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ar_subs.c,v 1.44 2005/09/17 06:05:04 christos Exp $ */
|
||||
/* $NetBSD: ar_subs.c,v 1.45 2005/11/01 23:43:27 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992 Keith Muller.
|
||||
|
@ -42,7 +42,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)ar_subs.c 8.2 (Berkeley) 4/18/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: ar_subs.c,v 1.44 2005/09/17 06:05:04 christos Exp $");
|
||||
__RCSID("$NetBSD: ar_subs.c,v 1.45 2005/11/01 23:43:27 christos Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -350,6 +350,11 @@ extract(void)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (kflag && (lstat(arcn->name, &sb) == 0)) {
|
||||
(void)rd_skip(arcn->skip + arcn->pad);
|
||||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
* with -u or -D only extract when the archive member is newer
|
||||
* than the file with the same name in the file system (no
|
||||
|
|
Loading…
Reference in New Issue