diff options
author | gramanas <anastasis.gramm2@gmail.com> | 2018-11-13 01:29:29 +0200 |
---|---|---|
committer | gramanas <anastasis.gramm2@gmail.com> | 2018-11-13 01:29:29 +0200 |
commit | d015a5e66ac9b92bba4eb5020e7bf2384f65ed25 (patch) | |
tree | b35417c4fb82e320f6d1297f449991c6c3537134 /src/actions.c | |
parent | 2638802ccd0d0776ebf1867181d4e3950a147074 (diff) | |
download | ck-d015a5e66ac9b92bba4eb5020e7bf2384f65ed25.tar.gz ck-d015a5e66ac9b92bba4eb5020e7bf2384f65ed25.tar.bz2 ck-d015a5e66ac9b92bba4eb5020e7bf2384f65ed25.zip |
Homedir finished
Diffstat (limited to 'src/actions.c')
-rw-r--r-- | src/actions.c | 11 |
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 { |