I don't know if it covers your situation, but back around Wget 1.9.1,
I made a change in src/ftp.c for my VMS adaptation which has a
hope-inspiring comment, anyway.

Original 1.10.2 code (starting near line 1765):

  if (start)
    {
      /* Just get everything.  */
      ftp_retrieve_list (u, start, con);
    }
  else if (!start)   /*** [This line is one of my absolute favorites.] ***/
    {
      if (action == GLOB_GLOBALL)
        {
          /* No luck.  */
          /* #### This message SUCKS.  We should see what was the
             reason that nothing was retrieved.  */
          logprintf (LOG_VERBOSE, _("No matches on pattern `%s'.\n"),
                     escnonprint (u->file));
        }
      else /* GLOB_GETONE or GLOB_GETALL */
        {
          /* Let's try retrieving it anyway.  */
          con->st |= ON_YOUR_OWN;
          res = ftp_loop_internal (u, NULL, con);
          return res;
        }
    }


My changed version:

  if (start)
    {
      /* Just get everything.  */
      ftp_retrieve_list (u, start, con);
    }
  else
    {
      if (action == GLOB_GLOBALL)
        {
          /* No luck.  */
          /* #### This message SUCKS.  We should see what was the
             reason that nothing was retrieved.  */
          logprintf (LOG_VERBOSE, _("No matches on pattern `%s'.\n"),
                     escnonprint (u->file));
        }
      else if (action == GLOB_GETONE)
        {
          /* Let's try retrieving it anyway.  */
          con->st |= ON_YOUR_OWN;
          res = ftp_loop_internal (u, NULL, con);
          return res;
        }

      /* If action == GLOB_GETALL, and the file list is empty, there's
         no point in trying to download anything or in complaining about
         it.  (An empty directory should not cause complaints.)
      */
    }

Higher up, I added a comment before the existing one:

  /* 2004-12-15 SMS.
   * Changed to avoid these fnmatch() tests if action == GLOB_GETONE.
   * VMS FTP servers may report file names with version numbers, while
   * the u->file lacks one, so the test always fails, leaving a
   * spuriously empty list.  This probably obviates the last-ditch
   * clause below ("else if (action == GLOB_GETONE)").
   */
  /* Now weed out the files that do not match our globbing pattern.
     If we are dealing with a globbing pattern, that is.  */



   No bets, but it might do something useful for you.  If you try it,
and it helps or hurts or not, a report back would be appreciated.

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

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

Reply via email to