FSEngine: Fix engine to handle root path correctly

Change-Id: Idd5b75875a87e624675ed40cba668caf5013e6a9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Marcus Tillmanns
2022-09-30 09:55:58 +02:00
parent 4f9a5ea896
commit b29c7bc4a6

View File

@@ -52,11 +52,11 @@ QAbstractFileEngine *FSEngineHandler::create(const QString &fileName) const
FilePath filePath = FilePath::fromString(fixedFileName);
if (filePath.needsDevice())
return new FSEngineImpl(filePath);
if (fixedFileName.compare(QDir::rootPath(), Qt::CaseInsensitive) == 0)
return new RootInjectFSEngine(fixedFileName);
}
if (fixedFileName.compare(QDir::rootPath(), Qt::CaseInsensitive) == 0)
return new RootInjectFSEngine(fixedFileName);
return nullptr;
}