forked from qt-creator/qt-creator
don't assert on $$files(/foo)
This commit is contained in:
@@ -2220,7 +2220,7 @@ QStringList ProFileEvaluator::Private::evaluateExpandFunction(const QString &fun
|
|||||||
}
|
}
|
||||||
int slash = r.lastIndexOf(QDir::separator());
|
int slash = r.lastIndexOf(QDir::separator());
|
||||||
if (slash != -1) {
|
if (slash != -1) {
|
||||||
dirs.append(r.left(slash));
|
dirs.append(r.left(slash+1));
|
||||||
r = r.mid(slash+1);
|
r = r.mid(slash+1);
|
||||||
} else {
|
} else {
|
||||||
dirs.append(QString());
|
dirs.append(QString());
|
||||||
@@ -2230,15 +2230,13 @@ QStringList ProFileEvaluator::Private::evaluateExpandFunction(const QString &fun
|
|||||||
for (int d = 0; d < dirs.count(); d++) {
|
for (int d = 0; d < dirs.count(); d++) {
|
||||||
QString dir = dirs[d];
|
QString dir = dirs[d];
|
||||||
QDir qdir(pfx + dir);
|
QDir qdir(pfx + dir);
|
||||||
if (!dir.isEmpty() && !dir.endsWith(QDir::separator()))
|
|
||||||
dir += QDir::separator();
|
|
||||||
for (int i = 0; i < (int)qdir.count(); ++i) {
|
for (int i = 0; i < (int)qdir.count(); ++i) {
|
||||||
if (qdir[i] == statics.strDot || qdir[i] == statics.strDotDot)
|
if (qdir[i] == statics.strDot || qdir[i] == statics.strDotDot)
|
||||||
continue;
|
continue;
|
||||||
QString fname = dir + qdir[i];
|
QString fname = dir + qdir[i];
|
||||||
if (IoUtils::fileType(pfx + fname) == IoUtils::FileIsDir) {
|
if (IoUtils::fileType(pfx + fname) == IoUtils::FileIsDir) {
|
||||||
if (recursive)
|
if (recursive)
|
||||||
dirs.append(fname);
|
dirs.append(fname + QDir::separator());
|
||||||
}
|
}
|
||||||
if (regex.exactMatch(qdir[i]))
|
if (regex.exactMatch(qdir[i]))
|
||||||
ret += fname;
|
ret += fname;
|
||||||
|
|||||||
Reference in New Issue
Block a user