forked from qt-creator/qt-creator
Utils::FileName: Fix append("") appending a '/'
Change-Id: I2767a901220711dbba6b34c36e256d282f468778 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
committed by
Daniel Teske
parent
1ce60cb31d
commit
21638efe9d
@@ -701,6 +701,8 @@ FileName FileName::relativeChildPath(const FileName &parent) const
|
||||
/// Appends \a s, ensuring a / between the parts
|
||||
FileName &FileName::appendPath(const QString &s)
|
||||
{
|
||||
if (s.isEmpty())
|
||||
return *this;
|
||||
if (!isEmpty() && !QString::endsWith(QLatin1Char('/')))
|
||||
appendString(QLatin1Char('/'));
|
||||
appendString(s);
|
||||
|
||||
Reference in New Issue
Block a user