diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2015-02-15 22:18:30 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2015-02-15 22:18:30 +0000 |
commit | 908d14f9c35bb3bc8b5ff316e6fb6c06ae6447b7 (patch) | |
tree | f9553e2ff1127585633d94dd12054b12479fb39d /bin/pax/file_subs.c | |
parent | e2b2dd619edd58f49d6ce8b43c1da41d66e9a7eb (diff) |
Fix two bugs. The first affected tar files with the same
directory listed twice with nothing created inside the directory
in between the two instances of the directory. The other fixes
extracting symlinks when the -C option is used. From guenther@
OK krw@
Diffstat (limited to 'bin/pax/file_subs.c')
-rw-r--r-- | bin/pax/file_subs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/pax/file_subs.c b/bin/pax/file_subs.c index 2c5475b963c..b71575bdfd6 100644 --- a/bin/pax/file_subs.c +++ b/bin/pax/file_subs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file_subs.c,v 1.42 2015/02/12 23:44:57 guenther Exp $ */ +/* $OpenBSD: file_subs.c,v 1.43 2015/02/15 22:18:29 millert Exp $ */ /* $NetBSD: file_subs.c,v 1.4 1995/03/21 09:07:18 cgd Exp $ */ /*- @@ -299,6 +299,7 @@ mk_link(char *to, struct stat *to_sb, char *from, int ign) syswarn(1, errno, "Unable to remove %s", from); return(-1); } + delete_dir(sb.st_dev, sb.st_ino); } else if (unlink(from) < 0) { if (!ign) { syswarn(1, errno, "Unable to remove %s", from); @@ -564,6 +565,7 @@ unlnk_exist(char *name, int type) syswarn(1,errno,"Unable to remove directory %s", name); return(-1); } + delete_dir(sb.st_dev, sb.st_ino); return(0); } |