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.c    2005-08-04 17:52:33.000000000 -0400
+++ /u/harringp/tmp/ftp-ls.c    2007-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



         

Reply via email to