- conjunction with '-O file'.
+2008-05-15 Micah Cowan <micah@cowan.name>
+
+ * NEWS: Entry for --ask-password.
+
+ 2008-05-14 Joao Ferreira <joao@joaoff.com>
+
+ * src/main.c, src/http.c, src/ftp.c: -nc is now working in
++ conjunction with '-O file'.
+
2008-05-12 Micah Cowan <micah@cowan.name>
* NEWS: Translations and -N/-O.
+ 2008-05-15 Steven Schubiger <schubiger@gmail.com>
+
+ * ftp.c (getftp): Verify that the file actually exists in FTP, by
+ checking it against the listing.
+
+2008-05-15 Micah Cowan <micah@cowan.name>
+
+ * main.c (prompt_for_password): Use the quote module.
+
+2008-05-14 Micah Cowan <micah@cowan.name>
+
+ * ftp.c (ftp_retrieve_list): Symlinks and other filenames
+ should be fully quoted.
+
2008-05-12 Micah Cowan <micah@cowan.name>
* main.c (main): Downgrade "-N with -O" to a warning, and switch
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 didn'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);
+ _("File %s already there; not retrieving.\n"), quote (con->target));
/* If the file is there, we suppose it's retrieved OK. */
return RETROK;
}
/* TODO: perform this check only once. */
if (!hs->existence_checked && file_exists_p (hs->local_file))
{
- if (opt.noclobber)
+ if (opt.noclobber && !opt.output_document)
{
/* If opt.noclobber is turned on and file already exists, do not
- retrieve the file */
+ retrieve the file. But if the output_document was given, then this
+ test was already done and the file didn't exist. Hence the !opt.output_document */
logprintf (LOG_VERBOSE, _("\
-File `%s' already there; not retrieving.\n\n"), hs->local_file);
+File %s already there; not retrieving.\n\n"), quote (hs->local_file));
/* If the file is there, we suppose it's retrieved OK. */
*dt |= RETROKF;
/* TODO: Ick! This code is now in both gethttp and http_loop, and is
* screaming for some refactoring. */
- if (got_name && file_exists_p (hstat.local_file) && opt.noclobber)
+ if (got_name && file_exists_p (hstat.local_file) && opt.noclobber && !opt.output_document)
{
/* If opt.noclobber is turned on and file already exists, do not
- retrieve the file */
+ retrieve the file. But if the output_document was given, then this
+ test was already done and the file didn't exist. Hence the !opt.output_document */
logprintf (LOG_VERBOSE, _("\
-File `%s' already there; not retrieving.\n\n"),
- hstat.local_file);
+File %s already there; not retrieving.\n\n"),
+ quote (hstat.local_file));
/* If the file is there, we suppose it's retrieved OK. */
*dt |= RETROKF;
for details.\n\n"));
opt.timestamping = false;
}
+ if (opt.noclobber && file_exists_p(opt.output_document))
+ {
+ /* Check if output file exists; if it does, exit. */
+ logprintf (LOG_VERBOSE, _("File `%s' already there; not retrieving.\n"), opt.output_document);
+ exit(1);
+ }
}
+ if (opt.ask_passwd && opt.passwd)
+ {
+ printf (_("Cannot specify both --ask-password and --password.\n"));
+ print_usage ();
+ exit (1);
+ }
+
if (!nurl && !opt.input_filename)
{
/* No URL specified. */