Dear Sir;

     We are using wget-1.8.2 and it's very convinient for our routine
program.  By the way, now we have a trouble with the return code
from wget in case of trying to use it with -r option,  When wget with
-r option fails in a ftp connection, wget returns a code 0.  If no -r
option,  it returns a code 1.  We look over source programs, and find
a suspicious line in ftp.c.

<ftp.c>

 +1699        if ((opt.ftp_glob && wild) || opt.recursive ||
opt.timestamping)
 +1700          {
 +1701            /* ftp_retrieve_glob is a catch-all function that gets
called
 +1702               if we need globbing, time-stamping or recursion.  Its
 +1703               third argument is just what we really need.  */
 +1704            ftp_retrieve_glob (u, &con,
 +1705                               (opt.ftp_glob && wild) ? GLOBALL :
GETONE);
 +1706          }
 +1707        else
 +1708          res = ftp_loop_internal (u, NULL, &con);

We guess the line 1704 should be a following line in order to return the
error code back to the main function.

 +1704            res = ftp_retrieve_glob (u, &con,
 +1705                               (opt.ftp_glob && wild) ? GLOBALL :
GETONE);

Is this right?  If we change ftp.c in this way, does any other problems not
occured?

Best Regards,
                           Norihisa Fujikawa,
                           Programming Section in Numerical Prediction
Division,
                           Japan Meteorological Agency

Reply via email to