Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
5.15.1
-
None
-
Linux 5.9.8 64bit
KDE Plasma 5.20.2
KDE Frameworks 5.75.0
Qt 5.15.1
-
-
3
-
7b1b1d990b5cb5cf7a10e689803f9ab6729d1e7f
-
Team 2 Foundation_Sprint 43
Description
QFileSelector::select(const QUrl &filepath) returns "" when QUrl("file:///") is passed into it (root directory)
In QFileSelectorPrivate::select(const QString&)
I see that QLatin1Char('/') is appended unconditionally, without checking whether fi.path() is already contains a slash at the end. Thus when "/" is passed, another "/" is appended, which leads to "//" string and QUrl::fromLocalFile(const QString&) chops it down, treating path as remote one, with an empty string left.
Attachments
Issue Links
- is duplicated by
-
QTBUG-85410 [Reg 5.9 -> 5.12] Cannot open filesystem root with Qt.openUrlExternally
- Closed
- relates to
-
QTBUG-86277 QUrl::fromLocalFile should return valid URLs for UNC paths with invalid hosts (\\wsl$)
- Closed