Utils: Don't crash on empty 'find' output

Change-Id: I772718d882ac7744c4f955190b038cd1e78f347d
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
hjk
2022-10-11 17:15:53 +02:00
parent 271c9055f4
commit e8eaf7809b

View File

@@ -711,6 +711,9 @@ static bool iterateWithFindHelper(
}
QStringList entries = out.split("\n", Qt::SkipEmptyParts);
if (entries.isEmpty())
return true;
// Remove the first line, it is always the directory we are searching in.
// as long as we do not specify "mindepth > 0"
entries.pop_front();