]> sjero.net Git - wget/blobdiff - src/http.c
Move duplicated code to a function.
[wget] / src / http.c
index e0e1e01379e97c5ab79199fe2522504d5cb34013..c3adbf40755150d2ab158f674941302b8dd521cb 100644 (file)
@@ -2723,16 +2723,8 @@ Remote file exists.\n\n"));
           && ((hstat.len == hstat.contlen) ||
               ((hstat.res == 0) && (hstat.contlen == -1))))
         {
-          /* #### This code repeats in http.c and ftp.c.  Move it to a
-             function!  */
           const char *fl = NULL;
-          if (opt.output_document)
-            {
-              if (output_stream_regular)
-                fl = opt.output_document;
-            }
-          else
-            fl = hstat.local_file;
+          set_local_file (&fl, hstat.local_file);
           if (fl)
             {
               time_t newtmr = -1;