Details
-
Type:
Bug
-
Status: Closed
-
Priority:
P3: Somewhat important
-
Resolution: Fixed
-
Affects Version/s: 5.15.1
-
Fix Version/s: 6.2.1, 6.3.0 Feature Freeze
-
Component/s: Core: I/O
-
Labels:None
-
Environment:Linux 5.9.8 64bit
KDE Plasma 5.20.2
KDE Frameworks 5.75.0
Qt 5.15.1
-
Platform/s:
-
Story Points:3
-
Commits:7b1b1d990b5cb5cf7a10e689803f9ab6729d1e7f
-
Sprint: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
-