sbase

suckless unix tools
git clone git://git.2f30.org/sbase.git
Log | Files | Refs | README | LICENSE

commit d67a1241af1d92829ac7c0d36c70ce93bb39119b
parent a56383e5e75725c237e01f4b5abda36a706d5f04
Author: Eivind Uggedal <eivind@uggedal.com>
Date:   Mon Feb 15 08:03:17 +0000

tar: don't change modes for hardlinks on extraction

Changing timestamps, modes and ownership of hardlinks
makes no sense.

Diffstat:
tar.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/tar.c b/tar.c @@ -325,6 +325,9 @@ unarchive(char *fname, ssize_t l, char b[BLKSIZ]) close(fd); } + if (h->type == HARDLINK) + return 0; + times[0].tv_sec = times[1].tv_sec = mtime; times[0].tv_nsec = times[1].tv_nsec = 0; if (!mflag && utimensat(AT_FDCWD, fname, times, AT_SYMLINK_NOFOLLOW) < 0)