There seems to be some quirky code in "ftp.c" affecting time-stamping
("-N").  The following complaints are based on the 1.9.1 released code,
so things may have improved (or at least changed) since then.

   I haven't checked elsewhere, but on VMS, setting the file date to
some old value ("touch()") and _then_ setting the permissions
("chmod()") results in a modified-date of now, rather than the (desired)
old date.

   This code is nice:

          /* #### This code repeats in http.c and ftp.c.  Move it to a
             function!  */
          const char *fl = NULL;
          if (opt.output_document)
            {
              if (opt.od_known_regular)
                fl = opt.output_document;
            }
          else
            fl = con->target;

However:

   1.  Just above this, there was a test ("file_exists_p (con->target)")
on a file which may not be the file of interest.  (I'll leave it to
someone else to justify an existence test before touch() but not
chmod().)

   2.  While "fl" gets the touch(), "chmod (con->target, f->perms)" may
act on a file which may not be the file of interest.


   When fetching a single, non-wildcard file from a VMS FTP server,
time-stamping fails silently.  This is a bit complicated.  When the user
specifies a single, non-wildcard file, ftp_loop() calls ftp_retrieve_glob()
with action = GETONE.  Despite the fact that there's no wildcard,
ftp_retrieve_glob() runs the "fnmatch (u->file, f->name, 0)" test, and
this fails because the user may request, say, "XXX.YYY", but this may
appear in the FTP server's listing as, say, "XXX.YYY;2".  Because there
was only one file in the list, and it failed the fnmatch() test, the
list is now empty, so ftp_retrieve_glob() tries a last-ditch attempt to
fetch the file using ftp_loop_internal() instead of the usual
ftp_retrieve_list().  This appears to work, but, sadly, the only
time-stamp code is in ftp_retrieve_list().

   I like the results I get from skipping the fnmatch() tests when the
action is GETONE:
                                     vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv 
  if (*u->file && (action == GLOBALL)) /*  || action == GETONE)) */

   When "-N" and "-O file" are specified, the debug/verbose messages
show the wrong name for the listing file.  For example, I claim:

ALP $ wget -ddd -vvv -N -O fred ftp://alp/misc/test/FTB.C
[...]
226 LIST Directory transfer complete.
10:46:43 (3.10 KB/s) - `fred' saved [186]
[...]

should look more like:

ALP $ wgetx -ddd -vvv -N -O fred ftp://alp/misc/test/FTB.C
[...]
226 LIST Directory transfer complete.
10:44:54 (3.15 KB/s) - `.listing' saved [186]
[...]


   As usual, my Wget material may be found near
"http://www.antinode.org/dec/sw/wget.html";.  Naturally, the latest
revised "ftp.c" includes my previous fixes to "ftp.c", not that anyone
else appears to care.

------------------------------------------------------------------------

   Steven M. Schweda               (+1) 651-699-9818
   382 South Warwick Street        [EMAIL PROTECTED]
   Saint Paul  MN  55105-2547

Reply via email to