#include "http.h" /* for save_cookies */
#include <getopt.h>
-#include "getpass.h"
+#include <getpass.h>
+#include <quote.h>
#ifndef PATH_SEPARATOR
# define PATH_SEPARATOR '/'
prompt_for_password (void)
{
if (opt.user)
- printf (_("Password for user \"%s\": "), opt.user);
+ printf (_("Password for user %s: "), quote (opt.user));
else
printf (_("Password: "));
return getpass("");
}
if (opt.timestamping)
{
- fputs (_("\
-Cannot specify -N if -O is given. See the manual for details.\n\n"), stdout);
- print_usage ();
- exit (1);
+ logprintf (LOG_NOTQUIET, "%s", _("\
+WARNING: timestamping does nothing in combination with -O. See the manual\n\
+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)