forked from qt-creator/qt-creator
Utils: Fix diriterator for scheme folders
Previously the "fileName" of every device inside a scheme subfolder would be empty. Therefore QDirIterator would skip them. Change-Id: Ifa46859aadbd8a81364a1fe0a72b9a50a7a396ca Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -233,6 +233,9 @@ QString FilePath::toString() const
|
||||
if (!needsDevice())
|
||||
return path();
|
||||
|
||||
if (pathView().isEmpty())
|
||||
return scheme() + "://" + encodedHost();
|
||||
|
||||
if (isRelativePath())
|
||||
return scheme() + "://" + encodedHost() + "/./" + pathView();
|
||||
return scheme() + "://" + encodedHost() + pathView();
|
||||
@@ -255,6 +258,9 @@ QString FilePath::toFSPathString() const
|
||||
if (scheme().isEmpty())
|
||||
return path();
|
||||
|
||||
if (pathView().isEmpty())
|
||||
return specialRootPath() + '/' + scheme() + '/' + encodedHost();
|
||||
|
||||
if (isRelativePath())
|
||||
return specialRootPath() + '/' + scheme() + '/' + encodedHost() + "/./" + pathView();
|
||||
return specialRootPath() + '/' + scheme() + '/' + encodedHost() + pathView();
|
||||
|
||||
Reference in New Issue
Block a user