forked from qt-creator/qt-creator
ProjectExplorer: prevent using QFileInfo on remote paths
Change-Id: Icf5dc9a80af69e8e1c3d733847e227486fa8c897 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -709,7 +709,7 @@ FilePath Project::projectDirectory(const FilePath &top)
|
|||||||
{
|
{
|
||||||
if (top.isEmpty())
|
if (top.isEmpty())
|
||||||
return FilePath();
|
return FilePath();
|
||||||
return FilePath::fromString(top.toFileInfo().absoluteDir().path());
|
return top.absolutePath();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Project::changeRootProjectDirectory()
|
void Project::changeRootProjectDirectory()
|
||||||
|
@@ -71,7 +71,7 @@ static FolderNode *recursiveFindOrCreateFolderNode(FolderNode *folder,
|
|||||||
Utils::FilePath directoryWithoutPrefix;
|
Utils::FilePath directoryWithoutPrefix;
|
||||||
bool isRelative = false;
|
bool isRelative = false;
|
||||||
|
|
||||||
if (path.isEmpty() || path.toFileInfo().isRoot()) {
|
if (path.isEmpty() || path.toDir().isRoot()) {
|
||||||
directoryWithoutPrefix = directory;
|
directoryWithoutPrefix = directory;
|
||||||
isRelative = false;
|
isRelative = false;
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user