forked from qt-creator/qt-creator
Generic Project: Fix relative paths outside of project directory
The paths are later split on '/' and thus should not end in '/'. Task-number: QTCREATORBUG-8840 Change-Id: I3fb1ddd53bb1e33123e20f683c481d56ad651d62 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com> Reviewed-by: Thorbjørn Lindeijer <bjorn@lindeijer.nl>
This commit is contained in:
@@ -71,6 +71,8 @@ QHash<QString, QStringList> sortFilesIntoPaths(const QString &base, const QSet<Q
|
||||
} else {
|
||||
// `file' is not part of the project.
|
||||
relativeFilePath = baseDir.relativeFilePath(absoluteFilePath.toString());
|
||||
if (relativeFilePath.endsWith(QLatin1Char('/')))
|
||||
relativeFilePath.chop(1);
|
||||
}
|
||||
|
||||
filesInPath[relativeFilePath].append(absoluteFileName);
|
||||
|
||||
Reference in New Issue
Block a user