]> sjero.net Git - wget/commitdiff
Handle Ctrl-D, empty password.
authorMicah Cowan <micah@cowan.name>
Sat, 17 May 2008 20:01:06 +0000 (13:01 -0700)
committerMicah Cowan <micah@cowan.name>
Sat, 17 May 2008 20:01:06 +0000 (13:01 -0700)
src/ChangeLog
src/main.c

index 0d4c94b53a664c33e20ed55feb9f55ce24ffbf02..ad8a67ec6b03615a3f439dcb256bc52ca06c3645 100644 (file)
@@ -1,3 +1,7 @@
+2008-05-17  Micah Cowan  <micah@cowan.name>
+
+       * main.c (main): Handle Ctrl-D on command-line.
+
 2008-05-15  Steven Schubiger  <schubiger@gmail.com>
 
        * ftp.c (getftp): Verify that the file actually exists in FTP, by
index 159973a0021a2e36e80d5c389f8c40fa38f3b91e..228bb27fe2ef00dc2171b4e94ec9cebd1e382415 100644 (file)
@@ -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)))