diff --git a/src/libs/utils/fsengine/fsenginehandler.cpp b/src/libs/utils/fsengine/fsenginehandler.cpp index a7f190e1e7b..f2b649c48da 100644 --- a/src/libs/utils/fsengine/fsenginehandler.cpp +++ b/src/libs/utils/fsengine/fsenginehandler.cpp @@ -48,16 +48,15 @@ QAbstractFileEngine *FSEngineHandler::create(const QString &fileName) const return new FixedListFSEngine(rootFilePath.pathAppended(scheme), filteredRoots); } } + + FilePath filePath = FilePath::fromString(fixedFileName); + if (filePath.needsDevice()) + return new FSEngineImpl(filePath); + + if (fixedFileName.compare(QDir::rootPath(), Qt::CaseInsensitive) == 0) + return new RootInjectFSEngine(fixedFileName); } - FilePath filePath = FilePath::fromString(fixedFileName); - if (filePath.needsDevice()) - return new FSEngineImpl(filePath); - - - if (fixedFileName.compare(QDir::rootPath(), Qt::CaseInsensitive) == 0) - return new RootInjectFSEngine(fixedFileName); - return nullptr; }