summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Tranter <jtranter@ics.com>2013-12-02 13:34:27 -0500
committerJeff Tranter <jtranter@ics.com>2013-12-10 15:08:34 +0100
commita2a7f28c0facd7ca946cea54e98c6019fcdb16ae (patch)
tree45ee3d2e4bb99a556b52175ea292fd1b15d023d5
parent8f60c8c0adca6e6183fb31b528d306439ca2d2c1 (diff)
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 <phartmann@blackberry.com>
-rw-r--r--src/qftp/qftp.cpp2
1 files changed, 1 insertions, 1 deletions
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+"
"(<DIR>|\\d+)\\s+(\\S.*)$"));
if (dosPattern.indexIn(bufferStr) == 0) {
_q_parseDosDir(dosPattern.capturedTexts(), userName, info);