forked from qt-creator/qt-creator
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user