mirror of
https://github.com/mirror/wget.git
synced 2025-01-23 18:50:11 +08:00
[svn] Correct the conversion of month entries for NT and VMS.
This commit is contained in:
parent
72b9bb6d92
commit
5ff5e936a5
@ -1,3 +1,9 @@
|
|||||||
|
2001-05-02 Jan Prikryl <prikryl@cg.tuwien.ac.at>
|
||||||
|
|
||||||
|
* ftp-ls.c (ftp_parse_winnt_ls): Assure months are being correctly
|
||||||
|
converted. Pointed out by <Stefan.Weil@de.heidelberg.com>.
|
||||||
|
(ftp_parse_vms_ls): Ditto.
|
||||||
|
|
||||||
2001-04-30 Hrvoje Niksic <hniksic@arsdigita.com>
|
2001-04-30 Hrvoje Niksic <hniksic@arsdigita.com>
|
||||||
|
|
||||||
* init.c (cmd_address): Zero SIN before using it; apparently
|
* init.c (cmd_address): Zero SIN before using it; apparently
|
||||||
|
10
src/ftp-ls.c
10
src/ftp-ls.c
@ -146,7 +146,7 @@ ftp_parse_unix_ls (const char *file, int ignore_perms)
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
cur.type = FT_UNKNOWN;
|
cur.type = FT_UNKNOWN;
|
||||||
DEBUGP (("UNKOWN; "));
|
DEBUGP (("UNKNOWN; "));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -441,9 +441,11 @@ ftp_parse_winnt_ls (const char *file)
|
|||||||
cur.name = xstrdup(tok);
|
cur.name = xstrdup(tok);
|
||||||
DEBUGP(("Name: '%s'\n", cur.name));
|
DEBUGP(("Name: '%s'\n", cur.name));
|
||||||
|
|
||||||
/* First column: mm-dd-yy */
|
/* First column: mm-dd-yy. Should atoi() on the month fail, january
|
||||||
|
will be assumed. */
|
||||||
tok = strtok(line, "-");
|
tok = strtok(line, "-");
|
||||||
month = atoi(tok);
|
month = atoi(tok) - 1;
|
||||||
|
if (month < 0) month = 0;
|
||||||
tok = strtok(NULL, "-");
|
tok = strtok(NULL, "-");
|
||||||
day = atoi(tok);
|
day = atoi(tok);
|
||||||
tok = strtok(NULL, " ");
|
tok = strtok(NULL, " ");
|
||||||
@ -667,7 +669,7 @@ ftp_parse_vms_ls (const char *file)
|
|||||||
}
|
}
|
||||||
for (i=0; i<12; i++) if (!strcmp(tok,months[i])) break;
|
for (i=0; i<12; i++) if (!strcmp(tok,months[i])) break;
|
||||||
/* Uknown months are mapped to January */
|
/* Uknown months are mapped to January */
|
||||||
month = (i%12)+1;
|
month = i % 12 ;
|
||||||
tok = strtok (NULL, " ");
|
tok = strtok (NULL, " ");
|
||||||
year = atoi (tok) - 1900;
|
year = atoi (tok) - 1900;
|
||||||
DEBUGP(("date parsed\n"));
|
DEBUGP(("date parsed\n"));
|
||||||
|
Loading…
Reference in New Issue
Block a user