ProjectExplorer: prevent using QFileInfo on remote paths

Change-Id: Icf5dc9a80af69e8e1c3d733847e227486fa8c897
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
David Schulz
2021-09-09 08:29:07 +02:00
parent 66b97761b6
commit d5e0567f78
2 changed files with 2 additions and 2 deletions

View File

@@ -709,7 +709,7 @@ FilePath Project::projectDirectory(const FilePath &top)
{
if (top.isEmpty())
return FilePath();
return FilePath::fromString(top.toFileInfo().absoluteDir().path());
return top.absolutePath();
}
void Project::changeRootProjectDirectory()

View File

@@ -71,7 +71,7 @@ static FolderNode *recursiveFindOrCreateFolderNode(FolderNode *folder,
Utils::FilePath directoryWithoutPrefix;
bool isRelative = false;
if (path.isEmpty() || path.toFileInfo().isRoot()) {
if (path.isEmpty() || path.toDir().isRoot()) {
directoryWithoutPrefix = directory;
isRelative = false;
} else {