RE: Wget 1.10.2 + FC6 + FTP mirroring in root folder

2007-05-30 Thread Richard Dale
Further to my previous email - it would appear that there was a change in
the Fedora/Redhat build of wget that causes this issue.  An upgrade to the
latest revision of 1.10.2 exhibited the problems and a downgrade avoided the
problems.

A workaround/solution is to use a trailing wildcard as follows:
/usr/bin/wget -r -m ftp://username:[EMAIL PROTECTED]/*

Rather than
/usr/bin/wget -r -m ftp://username:[EMAIL PROTECTED]/
(which worked in earlier revisions of 1.10.2)

This might make a good FAQ item.

Best regards,
Richard Dale.
Norgate Investor Services
- Premium quality Stock, Futures and Foreign Exchange Data for
  markets in Australia, Asia, Canada, Europe, UK  USA -
www.premiumdata.net



Re: Wget 1.10.2 + FC6 + FTP mirroring in root folder

2007-05-30 Thread Steven M. Schweda
From: Richard Dale

 [...] An upgrade to the latest revision of 1.10.2 exhibited the
 problems and a downgrade avoided the problems.

   Do these apparently different variants of wget version 1.10.2 say
different things in the wget -V report?



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


possible bug in wget-1.10.2 and earlier

2007-05-30 Thread Harrington, Paul
Hi,
wget appears to be confused by FTP servers that only have one space
between the file-size information. We only came across this problem
today so I don't know how common it is.
 
pjjH
 




From: Harrington, Paul 
Sent: Thursday, May 31, 2007 12:06 AM
To:  recipient-removed 
Subject: RE: File issue using WGET


Your FTP server must have changed the output of the listing format or,
more precisely, the string representation of some of the components has
changed such that only one space separates the group name from the
file-size. The bug is, of course, with wget but it is one that hitherto
had not been observed when interacting with your FTP server.
 
 
pjjH
 
 
 
[EMAIL PROTECTED] diff -u ftp-ls.c  ~/tmp
--- ftp-ls.c2005-08-04 17:52:33.0 -0400
+++ /u/harringp/tmp/ftp-ls.c2007-05-31 00:02:07.209955000 -0400
@@ -229,6 +229,18 @@
  break;
}
  errno = 0;
+  /* after the while loop terminates, t may not always
+ point to a space character. In the case when
+ there is only one-space between the user/group
+ information and the file-size, the space will
+ have been overwritten by a \0 via strok().  So,
+ if you have been through the loop at least once,
+ advance forward one chacter.
+  */
+
+  if (t  ptok)
+  t++;
+
  size = str_to_wgint (t, NULL, 10);
  if (size == WGINT_MAX  errno == ERANGE)
/* Out of range -- ignore the size.   Should