bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] bug #46584: wget --spider always returns zero exit status


From: address@hidden
Subject: Re: [Bug-wget] bug #46584: wget --spider always returns zero exit status
Date: Mon, 19 Sep 2016 19:06:59 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0

I'm not yet fully familiar with git format-patch (weird for me that it's adding email-like headers. Is it suppose to be email creation tool for patches?), I believe it will work for you.

Thanks
Piotr

W dniu 19.09.2016 o 18:56, Darshit Shah pisze:
Hi Piotr,

How did you create this patch? Because git refuses to accept it.
Patch format detection fails. Please regenerate all your patches using `git format-patch` so that we can apply the patches locally.

* Wajda, Piotr <address@hidden> [160916 22:48]:
Hi,
I'd like to start contributing to wget. I've chosen http://savannah.gnu.org/bugs/index.php?46584 for a good start.

Please let me know if attached patch is sane.

Thanks
Piotr

diff --git a/src/ftp.c b/src/ftp.c
index 39f20fa..e05d57b 100644
--- a/src/ftp.c
+++ b/src/ftp.c
@@ -1191,6 +1191,7 @@ Error in server response, closing control connection.\n"));
      if (opt.spider)
        {
          bool exists = false;
+          bool all_exist = true;
          struct fileinfo *f;
          uerr_t _res = ftp_get_listing (u, original_url, con, &f);
/* Set the DO_RETR command flag again, because it gets unset when @@ -1206,6 +1207,8 @@ Error in server response, closing control connection.\n"));
                    {
                      exists = true;
                      break;
+                    } else {
+                      all_exist = false;
                    }
                  f = f->next;
                }
@@ -1226,7 +1229,11 @@ Error in server response, closing control connection.\n"));
          con->csock = -1;
          fd_close (dtsock);
          fd_close (local_sock);
-          return RETRFINISHED;
+          if(all_exist) {
+              return RETRFINISHED;
+          } else {
+              return FTPNSFOD;
+          }
        }

      if (opt.verbose)



Attachment: 0001-Don-t-print-to-stdout-in-background.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]