X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fftp.c;h=e6163880ec0c7996cea37c4d2eddeee0e1f3a938;hp=5a9ecc6a694969a054c1c33560bbfc913b623f20;hb=888c30ba01f2ea7fe4ba1f24b536aafe887b2c37;hpb=1ddd88d7c5c32446cc6f8ea2ec4d97eba72bfb28 diff --git a/src/ftp.c b/src/ftp.c index 5a9ecc6a..e6163880 100644 --- a/src/ftp.c +++ b/src/ftp.c @@ -1091,7 +1091,9 @@ ftp_loop_internal (struct url *u, struct fileinfo *f, ccon *con) if (!con->target) con->target = url_file_name (u); - if (opt.noclobber && file_exists_p (con->target)) + /* If the output_document was given, then this check was already done and + the file doesn't exist. Hence the !opt.output_document */ + if (opt.noclobber && !opt.output_document && file_exists_p (con->target)) { logprintf (LOG_VERBOSE, _("File `%s' already there; not retrieving.\n"), con->target);