From: hniksic Date: Mon, 7 May 2001 19:08:29 +0000 (-0700) Subject: [svn] Avoid useless file_exists_p. Published in X-Git-Tag: v1.13~2148 X-Git-Url: http://sjero.net/git/?p=wget;a=commitdiff_plain;h=50980de84130c9b9e684a73d472910cdadddbfdb [svn] Avoid useless file_exists_p. Published in . --- diff --git a/src/ChangeLog b/src/ChangeLog index 12c7e3ef..343fa75a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2001-05-07 Hrvoje Niksic + + * http.c (http_loop): If restval is set, set no_truncate to 1 + unconditionally. + 2001-05-02 Jan Prikryl * ftp-ls.c (ftp_parse_winnt_ls): Assure months are being correctly diff --git a/src/http.c b/src/http.c index f595d292..b61f7de0 100644 --- a/src/http.c +++ b/src/http.c @@ -1514,6 +1514,7 @@ File `%s' already there, will not retrieve.\n"), u->local); hstat.restval = 0L; /* Decide whether or not to restart. */ if (((count > 1 && (*dt & ACCEPTRANGES)) || opt.always_rest) + /* #### this calls access() and then stat(); could be optimized. */ && file_exists_p (locf)) if (stat (locf, &st) == 0 && S_ISREG (st.st_mode)) hstat.restval = st.st_size; @@ -1522,7 +1523,7 @@ File `%s' already there, will not retrieve.\n"), u->local); refuse to truncate it if the server doesn't support continued downloads. */ if (opt.always_rest && hstat.restval) - hstat.no_truncate = file_exists_p (locf); + hstat.no_truncate = 1; /* Decide whether to send the no-cache directive. We send it in two cases: