Skip to content

Commit

Permalink
Add a custom fix for Qt 5.9.1 on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
pcolby committed Jul 27, 2017
1 parent a5c61e8 commit 2414c61
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/core/awsabstractsignature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,18 @@ QString AwsAbstractSignaturePrivate::canonicalPath(const QUrl &url) const
path.remove(0, 1); // Remove the first of two forward slashes.
qDebug() << "canonicalPath" << "path.remove" << path;
}

// As of at least Qt 5.9.1 (not sure about 5.9.0), QDir::cleanPath
// (incorrectly?) allows trailing '.' characters, presumably in some sort of
// attempt to support UNC paths. This is probably a bug in Qt, and not the
// same as the one mentioned above (which still appears to be in issue in
// Qt 5.9.1 also).
#if QT_VERSION == QT_VERSION_CHECK(5, 7, 1)
if (path.endsWith(QLatin1String("/."))) {
path.chop(1); // Remove the trailing '.' character.
qDebug() << "canonicalPath" << "path.chop" << path;
}
#endif
#endif

// Restore the trailing '/' if QDir::cleanPath (rightly) removed one.
Expand Down

0 comments on commit 2414c61

Please sign in to comment.