diff options
Diffstat (limited to 'usr.bin/fetch/fetch.c')
-rw-r--r-- | usr.bin/fetch/fetch.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/fetch/fetch.c b/usr.bin/fetch/fetch.c index 1cccc3a..c40b8b6 100644 --- a/usr.bin/fetch/fetch.c +++ b/usr.bin/fetch/fetch.c @@ -572,8 +572,8 @@ fetch(char *URL, const char *path) */ signal: /* set mtime of local file */ - if (!n_flag && us.mtime && !o_stdout - && (stat(path, &sb) != -1) && sb.st_mode & S_IFREG) { + if (!n_flag && us.mtime && !o_stdout && of != NULL && + (stat(path, &sb) != -1) && sb.st_mode & S_IFREG) { struct timeval tv[2]; fflush(of); |