Bug 1061898 - fix ftp dir listing for windows long dates, r=jduell
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Wed, 05 Nov 2014 13:10:26 +0000
changeset 217446 e10a2ca070e6ed6e8bb8aff244b24b6ff89b7d3c
parent 217445 f5dd8eb32a32768de4d4017f2c5ec405e7a11dee
child 217447 62c4e3d64b7d1fa63947154c8fda20838ae9243e
push id27882
push userryanvm@gmail.com
push dateTue, 25 Nov 2014 21:56:56 +0000
treeherdermozilla-central@ced1402861b8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjduell
bugs1061898
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1061898 - fix ftp dir listing for windows long dates, r=jduell
netwerk/streamconv/converters/ParseFTPList.cpp
--- a/netwerk/streamconv/converters/ParseFTPList.cpp
+++ b/netwerk/streamconv/converters/ParseFTPList.cpp
@@ -718,17 +718,17 @@ int ParseFTPList(const char *line, struc
       /*
        * "10-23-00  01:27PM       <DIR>          veronist"
        * "06-15-00  07:37AM       <DIR>          zoe"
        * "07-14-00  01:35PM              2094926 canprankdesk.tif"
        * "07-21-00  01:19PM                95077 Jon Kauffman Enjoys the Good Life.jpg"
        * "07-21-00  01:19PM                52275 Name Plate.jpg"
        * "07-14-00  01:38PM              2250540 Valentineoffprank-HiRes.jpg"
       */
-      if ((numtoks >= 4) && toklen[0] == 8 && toklen[1] == 7 && 
+      if ((numtoks >= 4) && (toklen[0] == 8 || toklen[0] == 10) && toklen[1] == 7 && 
           (*tokens[2] == '<' || isdigit(*tokens[2])) )
       {
         p = tokens[0];
         if ( isdigit(p[0]) && isdigit(p[1]) && p[2]=='-' && 
              isdigit(p[3]) && isdigit(p[4]) && p[5]=='-' &&
              isdigit(p[6]) && isdigit(p[7]) )
         {
           p = tokens[1];