Utils: Clean path in FilePath::resolvePath

Change-Id: I27e34e21c2922db4d7598c77688133aebf6ce893
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
hjk
2022-11-29 12:58:47 +01:00
parent 8679138f73
commit 4eee8a12fb
2 changed files with 6 additions and 3 deletions

View File

@@ -1263,9 +1263,8 @@ FilePath FilePath::pathAppended(const QString &path) const
FilePath other = FilePath::fromString(path);
if (isEmpty()) {
if (isEmpty())
return other;
}
QString p = this->path();
join(p, other.path());
@@ -1549,7 +1548,7 @@ bool FilePath::isRelativePath() const
FilePath FilePath::resolvePath(const FilePath &tail) const
{
if (tail.isRelativePath())
return pathAppended(tail.path());
return pathAppended(tail.path()).cleanPath();
return tail;
}