+2012-10-03 Merinov Nikolay <kim.roader@gmail.com>
+
+ * ftp.c (ftp_loop_internal): Ignore --no-clobber option when
+ receiving directory listing.
+
2012-10-07 Tim Ruehsen <tim.ruehsen@gmx.de>
Giuseppe Scrivano <gscrivano@gnu.org>
/* 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));