diff options
author | Ross Lagerwall <rosslagerwall@gmail.com> | 2015-02-28 12:48:07 +0000 |
---|---|---|
committer | Ross Lagerwall <rosslagerwall@gmail.com> | 2015-03-08 09:06:36 +0000 |
commit | 57caa7fad4bc4532366f557b5eda95357a23b101 (patch) | |
tree | c3365022d5e4d79066fec5a7dedbfadaf949af32 | |
parent | 6a260ff696a54c1604fb3a53eac002b0c6d76ba4 (diff) | |
download | gvfs-57caa7fad4bc4532366f557b5eda95357a23b101.tar.gz |
ftp: Fix FTP date parsing of midnight for DOS format
Fix from upstream:
http://hg.mozilla.org/mozilla-central/rev/2c21b94a7775
https://bugzilla.mozilla.org/show_bug.cgi?id=961346
https://bugzilla.gnome.org/show_bug.cgi?id=601583
-rw-r--r-- | daemon/ParseFTPList.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/daemon/ParseFTPList.c b/daemon/ParseFTPList.c index a930099b..6d171fd3 100644 --- a/daemon/ParseFTPList.c +++ b/daemon/ParseFTPList.c @@ -839,6 +839,8 @@ int ParseFTPList(const char *line, struct list_state *state, result->fe_time.tm_min = atoi(tokens[1]+3); if ((tokens[1][5]) == 'P' && result->fe_time.tm_hour < 12) result->fe_time.tm_hour += 12; + else if ((tokens[1][5]) == 'A' && result->fe_time.tm_hour == 12) + result->fe_time.tm_hour = 0; /* the caller should do this (if dropping "." and ".." is desired) if (result->fe_type == 'd' && result->fe_fname[0] == '.' && |