]> sjero.net Git - wget/blobdiff - src/ftp.c
Move duplicated code to a function.
[wget] / src / ftp.c
index 7c5093770e11ee6c1fe9e42c59f51041ef01324a..fe6ecd0a9e606d7c4331c7078767f7e483a66ae9 100644 (file)
--- a/src/ftp.c
+++ b/src/ftp.c
@@ -1590,16 +1590,8 @@ Already have correct symlink %s -> %s\n\n"),
           && dlthis
           && file_exists_p (con->target))
         {
-          /* #### 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 = con->target;
+          set_local_file (&fl, con->target);
           if (fl)
             touch (fl, f->tstamp);
         }