From a2a7f28c0facd7ca946cea54e98c6019fcdb16ae Mon Sep 17 00:00:00 2001 From: Jeff Tranter Date: Mon, 2 Dec 2013 13:34:27 -0500 Subject: Fix for parsing date format used by some Windows ftp servers. The code was not correctly parsing dates returned from a Windows ftp server, causing no files to be reported from the server. The date format has four digit years and the parsing code expected a two digit year. This change allows there to be 2 or 4 digit years in the dates. Task-number: QTBUG-35177 Change-Id: Ibbd7333776f7f998f1cc569a8768a1658bb0a376 Reviewed-by: Peter Hartmann --- src/qftp/qftp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qftp/qftp.cpp b/src/qftp/qftp.cpp index 2b48e5f..017a2e4 100644 --- a/src/qftp/qftp.cpp +++ b/src/qftp/qftp.cpp @@ -631,7 +631,7 @@ bool QFtpDTP::parseDir(const QByteArray &buffer, const QString &userName, QUrlIn } // DOS style FTP servers - QRegExp dosPattern(QLatin1String("^(\\d\\d-\\d\\d-\\d\\d\\ \\ \\d\\d:\\d\\d[AP]M)\\s+" + QRegExp dosPattern(QLatin1String("^(\\d\\d-\\d\\d-\\d\\d\\d?\\d?\\ \\ \\d\\d:\\d\\d[AP]M)\\s+" "(|\\d+)\\s+(\\S.*)$")); if (dosPattern.indexIn(bufferStr) == 0) { _q_parseDosDir(dosPattern.capturedTexts(), userName, info); -- cgit v1.2.3