diff options
-rw-r--r-- | qmake/option.cpp | 4 |
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); } |