Fix finding specs in the unsupported/ directory.
The -spec argument was interpreted as a relative directory as soon as it contained a slash. Fix this by checking if the directory exists before attempting to interpret it. Change-Id: Ide8f0418abc719b0be582d2d72642a141f6c6dea Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
parent
3ff7bc086b
commit
11f9d18731
@ -149,8 +149,11 @@ static QString detectProjectFile(const QString &path)
|
|||||||
static QString cleanSpec(const QString &spec)
|
static QString cleanSpec(const QString &spec)
|
||||||
{
|
{
|
||||||
QString ret = QDir::cleanPath(spec);
|
QString ret = QDir::cleanPath(spec);
|
||||||
if (ret.contains('/'))
|
if (ret.contains('/')) {
|
||||||
ret = QDir::cleanPath(QFileInfo(ret).absoluteFilePath());
|
const QFileInfo specDirInfo(ret);
|
||||||
|
if (specDirInfo.exists() && specDirInfo.isDir())
|
||||||
|
ret = QDir::cleanPath(specDirInfo.absoluteFilePath());
|
||||||
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user