In case utimensat() fails, we want to report the file
that produced the error, not the last file we extracted.
---
tar.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tar.c b/tar.c
index b74c134..77b94ff 100644
--- a/tar.c
+++ b/tar.c
@@ -494,7 +494,7 @@ xt(int argc, char *argv[], int mode)
times[0].tv_sec = times[1].tv_sec = dirtime->mtime;
times[0].tv_nsec = times[1].tv_nsec = 0;
if (utimensat(AT_FDCWD, dirtime->name, times, 0) < 0)
- eprintf("utimensat %s:", fname);
+ eprintf("utimensat %s:", dirtime->name);
free(dirtime->name);
}
free(dirtimes);
--
2.28.0