Docker: Implement directoryEntries alternative

Use 'find' on a docker image to search for diretory entries
if it is available.
If the find call fails we still may fallback to using 'ls'.
This silences currently active soft asserts regarding the
usage of sort or file filters when we are able to use 'find'.
Only support the most common and currently used options and
bark if some unsupported option is in use.

Task-number: QTCREATORBUG-26258
Change-Id: I9a082ea7aca1b6db7dcb668cfe40ed0ed48cd567
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2021-09-14 14:14:15 +02:00
parent 3f0a54d41c
commit 64e438ed83
2 changed files with 82 additions and 0 deletions

View File

@@ -117,6 +117,10 @@ public:
Utils::FilePath mapFromLocalAccess(const QString &filePath) const;
private:
Utils::FilePaths findFilesWithFind(const Utils::FilePath &filePath,
const QStringList &nameFilters,
QDir::Filters filters,
QDir::SortFlags sort) const;
void fromMap(const QVariantMap &map) final;
QVariantMap toMap() const final;