summaryrefslogtreecommitdiff
path: root/usr.bin/compress/main.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2007-04-03 20:25:36 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2007-04-03 20:25:36 +0000
commit0e97dadba9e05173540923cb0f41bd0e6df41c22 (patch)
treea9a694222739a7326d86ec01648a391531b5c7c9 /usr.bin/compress/main.c
parent77b9bddcf258ee6ed964a6c2eb1cb7b0fc6c2ef9 (diff)
Fix PR 5417; gunzip should set the timestamp based on the
compressed file by default. OK otto@
Diffstat (limited to 'usr.bin/compress/main.c')
-rw-r--r--usr.bin/compress/main.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/usr.bin/compress/main.c b/usr.bin/compress/main.c
index 82e11fb30c7..5211c643407 100644
--- a/usr.bin/compress/main.c
+++ b/usr.bin/compress/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.68 2007/01/18 20:53:36 millert Exp $ */
+/* $OpenBSD: main.c,v 1.69 2007/04/03 20:25:35 millert Exp $ */
#ifndef SMALL
static const char copyright[] =
@@ -36,7 +36,7 @@ static const char license[] =
#endif /* SMALL */
#ifndef SMALL
-static const char main_rcsid[] = "$OpenBSD: main.c,v 1.68 2007/01/18 20:53:36 millert Exp $";
+static const char main_rcsid[] = "$OpenBSD: main.c,v 1.69 2007/04/03 20:25:35 millert Exp $";
#endif
#include <sys/param.h>
@@ -744,12 +744,10 @@ setfile(const char *name, int fd, struct stat *fs)
if (fs->st_flags && fchflags(fd, fs->st_flags))
warn("fchflags: %s", name);
- if (!nosave) {
- TIMESPEC_TO_TIMEVAL(&tv[0], &fs->st_atimespec);
- TIMESPEC_TO_TIMEVAL(&tv[1], &fs->st_mtimespec);
- if (futimes(fd, tv))
- warn("futimes: %s", name);
- }
+ TIMESPEC_TO_TIMEVAL(&tv[0], &fs->st_atimespec);
+ TIMESPEC_TO_TIMEVAL(&tv[1], &fs->st_mtimespec);
+ if (futimes(fd, tv))
+ warn("futimes: %s", name);
}
int