Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
6.8.1
-
None
-
-
7d05f5ed7 (dev), 86597d289 (6.9), 09f047079 (6.8)
Description
With Qt 6.8.1, the following code
auto url = QUrl::fromUserInput(QStringLiteral("/tmp/..///asdf/")); auto adjusted = url.adjusted(QUrl::NormalizePathSegments); qCritical() << url << adjusted;
prints
QUrl("file:///tmp/..///asdf/") QUrl("")
With Qt 5.15.16 (and, as far as I know, with Qt 6.8.0), the same code prints
QUrl("file:///tmp/..///asdf/") QUrl("file:///asdf/")
Qt Test prints more information about the invalid URL:
Invalid URL: Path component starts with '//' and authority is absent; source was "//asdf/"; scheme = "file", path = "//asdf/"
This regression causes a failure of KDevelop's TestPath unit test, but I am not aware of any problems for non-test code.