From 11f9d187312f54dce4f5233b7fe696a0d949facc Mon Sep 17 00:00:00 2001 From: Thomas McGuire Date: Tue, 6 Mar 2012 13:13:09 +0100 Subject: 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 --- qmake/option.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'qmake') diff --git a/qmake/option.cpp b/qmake/option.cpp index 3fc66a8f3d..ef613b90ad 100644 --- a/qmake/option.cpp +++ b/qmake/option.cpp @@ -149,8 +149,11 @@ static QString detectProjectFile(const QString &path) static QString cleanSpec(const QString &spec) { QString ret = QDir::cleanPath(spec); - if (ret.contains('/')) - ret = QDir::cleanPath(QFileInfo(ret).absoluteFilePath()); + if (ret.contains('/')) { + const QFileInfo specDirInfo(ret); + if (specDirInfo.exists() && specDirInfo.isDir()) + ret = QDir::cleanPath(specDirInfo.absoluteFilePath()); + } return ret; } -- cgit v1.2.3