diff options
author | Timo Teräs <timo.teras@iki.fi> | 2023-04-26 13:13:32 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2023-04-26 13:13:32 +0300 |
commit | 06fef8ad8a936269a1868cbe1421ac72797f9a3e (patch) | |
tree | a51befaac7507975f545b4dee887cbda308cd5df /src/database.c | |
parent | 551f4683df801e63286f0c5b5eed40e2bb349578 (diff) | |
download | apk-tools-06fef8ad8a936269a1868cbe1421ac72797f9a3e.tar.gz apk-tools-06fef8ad8a936269a1868cbe1421ac72797f9a3e.tar.bz2 apk-tools-06fef8ad8a936269a1868cbe1421ac72797f9a3e.tar.xz apk-tools-06fef8ad8a936269a1868cbe1421ac72797f9a3e.zip |
db: fix apk_db_foreach_matching_name to match all without args
This is a fixup to the backport commit 67f5a753:
db, apps: sort display results based on package names
This makes apk_db_foreach_matching_name() act consistently on
between 2.14-stable and master. And updates the call sites where
differing behaviour is needed, and fixes dot and other call sites
to work again.
fixes #10893
Diffstat (limited to 'src/database.c')
-rw-r--r-- | src/database.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/database.c b/src/database.c index d7f197b..48b5f17 100644 --- a/src/database.c +++ b/src/database.c @@ -3049,14 +3049,14 @@ int apk_db_foreach_matching_name(struct apk_database *db, struct apk_string_arra struct apk_name *name; struct match_ctx mctx = { .db = db, - .filter = filter, .cb = cb, .cb_ctx = ctx, }; int r; - if (!filter || !filter->num) return 0; + if (!filter || !filter->num) goto all; + mctx.filter = filter; foreach_array_item(pmatch, filter) if (strchr(*pmatch, '*') != NULL) goto all; |