bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-wget] Bug Minor FTP parsing problem - can't parse month names in up


From: Bykov Aleksey
Subject: [Bug-wget] Bug Minor FTP parsing problem - can't parse month names in uppercase
Date: Fri, 13 Sep 2013 12:43:54 +0300
User-agent: Opera Mail/12.14 (Win32)

Greetings
Some times ago Anton Nikolaev report to me about FTP bug. He is promised to post there, but I cant find. Sorry if this was already discussed. Wget cannot parse FTP listing if month abbreviate is use uppercase instead of lowercase.

Debug Log http://pastebin.com/RqeSnfs4
Listing fragment
drw-r--r-- 2 XDB oracle 0 JUL 06 18:42 .
drw-r--r-- 2 XDB oracle 0 JUL 06 18:42 ..
drw-r--r-- 2 XDB oracle 0 JAN 11 06:48 00001
drw-r--r-- 2 XDB oracle 0 JUN 30 00:38 00001CRED
drw-r--r-- 2 XDB oracle 0 APR 20 01:02 00001_01
drw-r--r-- 2 XDB oracle 0 JAN 11 06:48 00001val

Possible solutions:
diff --git a/src/ftp-ls.c b/src/ftp-ls.c
--- a/src/ftp-ls.c
+++ b/src/ftp-ls.c
@@ -199,7 +199,7 @@ ftp_parse_unix_ls (const char *file, int ignore_perms)
           if (next < 0)         /* a month name was not encountered */
             {
               for (i = 0; i < 12; i++)
-                if (!strcmp (tok, months[i]))
+                if (!strcasecmp (tok, months[i]))
                   break;
               /* If we got a month, it means the token before it is the
                  size, and the filename is three tokens away.  */
--
Best regars, Alex



reply via email to

[Prev in Thread] Current Thread [Next in Thread]