diff options
author | Daniel Teske <daniel.teske@digia.com> | 2014-11-06 17:03:21 +0100 |
---|---|---|
committer | Daniel Teske <daniel.teske@theqtcompany.com> | 2014-11-07 14:31:22 +0100 |
commit | 21638efe9db3404e5edb5efa2f8a0f7e95968a06 (patch) | |
tree | 7191904a4f384b0dedd3e0a6c8aafbb05b8f0d63 /src/libs/utils/fileutils.cpp | |
parent | 1ce60cb31d431dd2b65f20a610b84e1789c3426a (diff) | |
download | qt-creator-21638efe9db3404e5edb5efa2f8a0f7e95968a06.tar.gz |
Utils::FileName: Fix append("") appending a '/'
Change-Id: I2767a901220711dbba6b34c36e256d282f468778
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Diffstat (limited to 'src/libs/utils/fileutils.cpp')
-rw-r--r-- | src/libs/utils/fileutils.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libs/utils/fileutils.cpp b/src/libs/utils/fileutils.cpp index c911a98860..6d75342b99 100644 --- a/src/libs/utils/fileutils.cpp +++ b/src/libs/utils/fileutils.cpp @@ -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); |