diff options
Diffstat (limited to 'usr.bin/fetch')
-rw-r--r-- | usr.bin/fetch/fetch.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/fetch/fetch.c b/usr.bin/fetch/fetch.c index d72814b8ba08..b33fb037850b 100644 --- a/usr.bin/fetch/fetch.c +++ b/usr.bin/fetch/fetch.c @@ -385,7 +385,8 @@ fetch(char *URL, char *path) stat_end(&xs); /* Set mtime of local file */ - if (!n_flag && us.mtime && !o_stdout) { + if (!n_flag && us.mtime && !o_stdout + && (stat(path, &sb) != -1) && sb.st_mode & S_IFREG) { struct timeval tv[2]; fflush(of); |