forked from qt-creator/qt-creator
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:
@@ -52,11 +52,11 @@ QAbstractFileEngine *FSEngineHandler::create(const QString &fileName) const
|
|||||||
FilePath filePath = FilePath::fromString(fixedFileName);
|
FilePath filePath = FilePath::fromString(fixedFileName);
|
||||||
if (filePath.needsDevice())
|
if (filePath.needsDevice())
|
||||||
return new FSEngineImpl(filePath);
|
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;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user