X-Git-Url: http://sjero.net/git/?a=blobdiff_plain;f=src%2Fftp.c;h=b585631fc7788402874fa21e75be406ef59ecad0;hb=359dd167602071cfa62d6c586ca846ede5ed7c29;hp=669e66373e1f384f5bb5c6d535c43c1a1c86b4d7;hpb=196f70a7df2f2249fcb84446a899f265cdb4129c;p=wget diff --git a/src/ftp.c b/src/ftp.c index 669e6637..b585631f 100644 --- a/src/ftp.c +++ b/src/ftp.c @@ -1424,7 +1424,12 @@ ftp_loop_internal (struct url *u, struct fileinfo *f, ccon *con, char **local_fi /* If the output_document was given, then this check was already done and the file didn't exist. Hence the !opt.output_document */ - if (opt.noclobber && !opt.output_document && file_exists_p (con->target)) + + /* If we receive .listing file it is necessary to determine system type of the ftp + server even if opn.noclobber is given. Thus we must ignore opt.noclobber in + order to establish connection with the server and get system type. */ + if (opt.noclobber && !opt.output_document && file_exists_p (con->target) + && !((con->cmd & DO_LIST) && !(con->cmd & DO_RETR))) { logprintf (LOG_VERBOSE, _("File %s already there; not retrieving.\n"), quote (con->target));