forked from qt-creator/qt-creator
Utils: Fix FilePath::withTildeHomePath()
Or rather, re-instate previous behavior. Amends c9023e85108. Change-Id: I1be0dd8c42db8430323b8368a8164b1623d5ced5 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -1705,8 +1705,9 @@ QString FilePath::withTildeHomePath() const
|
|||||||
|
|
||||||
QString outPath = cleanPath().absoluteFilePath().path();
|
QString outPath = cleanPath().absoluteFilePath().path();
|
||||||
if (outPath.startsWith(homePath))
|
if (outPath.startsWith(homePath))
|
||||||
outPath = '~' + outPath.mid(homePath.size());
|
return '~' + outPath.mid(homePath.size());
|
||||||
return outPath;
|
|
||||||
|
return toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
QTextStream &operator<<(QTextStream &s, const FilePath &fn)
|
QTextStream &operator<<(QTextStream &s, const FilePath &fn)
|
||||||
|
Reference in New Issue
Block a user