ProjectExplorer: Prevent build directory on non-existing drive

A drive that is not actually there is apparently different enough from a
"normal" non-writable location to seriously throw off some build tools,
so spend some effort in preventing this.

Fixes: QTCREATORBUG-25633
Change-Id: I5a15b0b2a3a882a08f50866c23e4d45c93fd78c9
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Kandeler
2021-07-22 15:11:41 +02:00
parent 67b082b51b
commit b6dd53d4ed
4 changed files with 38 additions and 0 deletions

View File

@@ -257,6 +257,9 @@ void BuildConfiguration::setBuildDirectory(const FilePath &dir)
if (dir == d->m_buildDirectoryAspect->filePath())
return;
d->m_buildDirectoryAspect->setFilePath(dir);
const FilePath fixedDir = BuildDirectoryAspect::fixupDir(buildDirectory());
if (!fixedDir.isEmpty())
d->m_buildDirectoryAspect->setFilePath(fixedDir);
emitBuildDirectoryChanged();
}