summaryrefslogtreecommitdiffstats
path: root/qmake/option.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qmake/option.cpp')
-rw-r--r--qmake/option.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/qmake/option.cpp b/qmake/option.cpp
index 52f9cb8a0e..4da2a1ae2c 100644
--- a/qmake/option.cpp
+++ b/qmake/option.cpp
@@ -462,7 +462,9 @@ Option::init(int argc, char **argv)
void Option::prepareProject(const QString &pfile)
{
- QString srcpath = QDir::cleanPath(QFileInfo(pfile).absolutePath());
+ // Canonicalize only the directory, otherwise things will go haywire
+ // if the file itself is a symbolic link.
+ const QString srcpath = QFileInfo(QFileInfo(pfile).absolutePath()).canonicalFilePath();
globals->setDirectories(srcpath, output_dir);
}