aboutsummaryrefslogtreecommitdiffstats
path: root/src/actions.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions.c')
-rw-r--r--src/actions.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/actions.c b/src/actions.c
index efffc1b..b164779 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -133,8 +133,8 @@ int run_LIST(UserOpt *opt, Conf *conf) {
}
cklist *list_type = list_make_new();
-
ListOpt listOpt = list_make_options(opt->args);
+
if (listOpt.err) {
close_DB(&db);
list_free(list_type);
@@ -142,13 +142,13 @@ int run_LIST(UserOpt *opt, Conf *conf) {
}
switch(listOpt._lt) {
case LT_PATH:
- list_get_paths(&db, list_type);
+ list_get_paths(&db, list_type, listOpt.attr);
break;
case LT_PROGRAM:
list_get_programs(&db, list_type);
break;
case LT_TREE:
- list_get_path_program_tree(&db, list_type);
+ list_get_path_program_tree(&db, list_type, listOpt.attr);
list_print(list_type);
close_DB(&db);
list_free(list_type);
@@ -183,7 +183,7 @@ int run_SEARCH(UserOpt *opt, Conf *conf) {
}
DB db = open_DB(opt);
cklist *paths = list_make_new();
- list_get_paths(&db, paths);
+ list_get_paths(&db, paths, 0);
close_DB(&db);
if (list_size(paths)) {
do {