forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/5.0'
Change-Id: I370268624bd6e91e7b44fa236e913f5f55867e17
This commit is contained in:
@@ -1196,9 +1196,24 @@ FilePath FilePath::pathAppended(const QString &path) const
|
||||
FilePath fn = *this;
|
||||
if (path.isEmpty())
|
||||
return fn;
|
||||
if (!fn.m_data.isEmpty() && !fn.m_data.endsWith(QLatin1Char('/')))
|
||||
fn.m_data.append('/');
|
||||
fn.m_data.append(path);
|
||||
|
||||
if (fn.m_data.isEmpty()) {
|
||||
fn.m_data = path;
|
||||
return fn;
|
||||
}
|
||||
|
||||
if (fn.m_data.endsWith('/')) {
|
||||
if (path.startsWith('/'))
|
||||
fn.m_data.append(path.mid(1));
|
||||
else
|
||||
fn.m_data.append(path);
|
||||
} else {
|
||||
if (path.startsWith('/'))
|
||||
fn.m_data.append(path);
|
||||
else
|
||||
fn.m_data.append('/').append(path);
|
||||
}
|
||||
|
||||
return fn;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user