forked from qt-creator/qt-creator
Don't add a '/' if the filename is empty
Change-Id: I66d530d70cac17365f3d5925eb76318fe774470f Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
committed by
Daniel Teske
parent
c9a31beda0
commit
dab8d6d0e7
@@ -554,7 +554,7 @@ FileName FileName::relativeChildPath(const FileName &parent) const
|
|||||||
/// Appends \a s, ensuring a / between the parts
|
/// Appends \a s, ensuring a / between the parts
|
||||||
FileName &FileName::appendPath(const QString &s)
|
FileName &FileName::appendPath(const QString &s)
|
||||||
{
|
{
|
||||||
if (!QString::endsWith(QLatin1Char('/')))
|
if (!isEmpty() && !QString::endsWith(QLatin1Char('/')))
|
||||||
append(QLatin1Char('/'));
|
append(QLatin1Char('/'));
|
||||||
append(s);
|
append(s);
|
||||||
return *this;
|
return *this;
|
||||||
|
|||||||
Reference in New Issue
Block a user