mirror of https://github.com/b4tman/qtftp.git
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>
This commit is contained in:
parent
8f60c8c0ad
commit
a2a7f28c0f
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue