commit 3c2f8b0cfa592bbe31ee4270cf275acfd261cd71
parent 2f128ab050b39ced864fa24c6afc0eb6e6225f55
Author: Eivind Uggedal <eivind@uggedal.com>
Date: Mon, 15 Feb 2016 08:03:17 +0000
tar: don't change modes for hardlinks on extraction
Changing timestamps, modes and ownership of hardlinks
makes no sense.
Diffstat:
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)