aboutsummaryrefslogtreecommitdiffstats
path: root/src/package.c
diff options
context:
space:
mode:
authorJason Woodward2014-02-13 20:49:19 -0500
committerJason Woodward2014-02-13 20:49:19 -0500
commitd912cbd8d56f845219aca1e556d586c8adf4ee97 (patch)
tree7aed0e56ea2181654a86434fe4d290e1d00e97f9 /src/package.c
parentc7f5df076dfe1c8de32abe517f7aca25f1ccdad4 (diff)
downloadslapt-get-d912cbd8d56f845219aca1e556d586c8adf4ee97.tar.gz
tweak search to return exact name matches in case of regex characters
Diffstat (limited to 'src/package.c')
-rw-r--r--src/package.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/package.c b/src/package.c
index f4c83fd..9524cb0 100644
--- a/src/package.c
+++ b/src/package.c
@@ -1318,6 +1318,10 @@ slapt_pkg_list_t *slapt_search_pkg_list(slapt_pkg_list_t *list,
return matches;
for (i = 0; i < list->pkg_count; i++ ) {
+ if (strcmp(list->pkgs[i]->name, pattern) == 0) {
+ slapt_add_pkg_to_pkg_list(matches,list->pkgs[i]);
+ continue;
+ }
slapt_execute_regex(search_regex,list->pkgs[i]->name);
name_r = search_regex->reg_return;