From c3bd5412a8a046d0b7113ea692bf6c9333d91be7 Mon Sep 17 00:00:00 2001 From: Micah Cowan Date: Sat, 17 May 2008 13:01:06 -0700 Subject: [PATCH] Handle Ctrl-D, empty password. --- src/ChangeLog | 4 ++++ src/main.c | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 0d4c94b5..ad8a67ec 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2008-05-17 Micah Cowan + + * main.c (main): Handle Ctrl-D on command-line. + 2008-05-15 Steven Schubiger * ftp.c (getftp): Verify that the file actually exists in FTP, by diff --git a/src/main.c b/src/main.c index 159973a0..228bb27f 100644 --- a/src/main.c +++ b/src/main.c @@ -1031,7 +1031,12 @@ for details.\n\n")); int dt; if (opt.ask_passwd) - opt.passwd = prompt_for_password (); + { + opt.passwd = prompt_for_password (); + + if (opt.passwd == NULL || opt.passwd[0] == '\0') + exit (1); + } if ((opt.recursive || opt.page_requisites) && (url_scheme (*t) != SCHEME_FTP || url_uses_proxy (*t))) -- 2.39.2