aboutsummaryrefslogtreecommitdiffstats
path: root/src/actions.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions.c')
-rw-r--r--src/actions.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/actions.c b/src/actions.c
index 36e3a42..990b371 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -56,7 +56,7 @@ int run_ADD(UserOpt * opt, Conf *conf) {
}
add_print_opts(&addOpt);
/* Try adding the new config to the DB */
- if (add_transaction_try(&db, &addOpt)) {
+ if (add_transaction_try(&db, &addOpt, conf->home_dir)) {
goto error;
}
add_make_link(&addOpt, conf);
@@ -190,13 +190,13 @@ int run_LIST(UserOpt *opt, Conf *conf) {
char tmp[STR_L] = "";
switch(listOpt._lt) {
case LT_PATH:
- list_get_paths(&db, the_list, listOpt.bName, listOpt.attr);
+ list_get_paths(&db, the_list, listOpt.bName, listOpt.attr, conf->home_dir);
break;
case LT_PROGRAM:
list_get_programs(&db, the_list);
break;
case LT_TREE:
- list_get_path_program_tree(&db, the_list, listOpt.bName, listOpt.attr);
+ list_get_path_program_tree(&db, the_list, listOpt.bName, listOpt.attr, conf->home_dir);
list_print(the_list);
goto close;
case LT_CKCONF:
@@ -218,7 +218,7 @@ int run_LIST(UserOpt *opt, Conf *conf) {
ERR("Program %s doesn't exist in the database.", listOpt.pName);
goto error;
}
- get_program_paths(&db, the_list, listOpt.pName, listOpt.bName, listOpt.attr);
+ get_program_paths(&db, the_list, listOpt.pName, listOpt.bName, listOpt.attr, conf->home_dir);
break;
}
switch(listOpt._lst) {
@@ -242,7 +242,6 @@ int run_LIST(UserOpt *opt, Conf *conf) {
}
int run_SEARCH(UserOpt *opt, Conf *conf) {
- UNUSED(conf);
if (system("which grep > /dev/null 2>&1") != 0) {
ERR("No grep avaliable. Please make sure you have grep installed.");
return -1;
@@ -256,7 +255,7 @@ int run_SEARCH(UserOpt *opt, Conf *conf) {
}
cklist *paths = list_make_new();
- list_get_paths(&db, paths, 0 /*basename*/, 0/*attributes*/);
+ list_get_paths(&db, paths, 0 /*basename*/, 0/*attributes*/, conf->home_dir);
close_DB(&db);
if (list_size(paths) && list_size(opt->args)) {
do {