diff --git a/usr.bin/ftp/fetch.c b/usr.bin/ftp/fetch.c index 84817849803..1882436c5cb 100644 --- a/usr.bin/ftp/fetch.c +++ b/usr.bin/ftp/fetch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fetch.c,v 1.220 2025/06/02 20:57:36 schwarze Exp $ */ +/* $OpenBSD: fetch.c,v 1.221 2025/11/20 11:15:59 tb Exp $ */ /* $NetBSD: fetch.c,v 1.14 1997/08/18 10:20:20 lukem Exp $ */ /*- @@ -1128,7 +1128,7 @@ cleanup_url_get: ftp_close(&fin, &tls, &fd); if (out >= 0 && out != fileno(stdout)) { #ifndef SMALL - if (server_timestamps && lmt.tm_zone != 0 && + if (server_timestamps && lmt.tm_zone != NULL && fstat(out, &stbuf) == 0 && S_ISREG(stbuf.st_mode) != 0) { ts[0].tv_nsec = UTIME_NOW; ts[1].tv_nsec = 0;