From bc2899dd69fce0f1868dbfad3394ef8b3dc48069 Mon Sep 17 00:00:00 2001 From: gramanas Date: Wed, 3 Oct 2018 16:57:06 +0300 Subject: Basic delete --- src/actions.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/actions.c') diff --git a/src/actions.c b/src/actions.c index f07d1ae..59343ab 100644 --- a/src/actions.c +++ b/src/actions.c @@ -84,20 +84,14 @@ int run_DEL(UserOpt * opt, Conf *conf) { DelOpt delOpt = del_make_options(opt->args); switch(delOpt.err) { case DEL_NO_ERR: - if (delOpt.isConf) { - printf("deleting conf %s\n", delOpt.path); - // del_transaction_try(&db, delOpt.path, delOpt.isConf); - } else { - printf("Deleting program %s\n", delOpt.prog); - // del_transaction_try(&db, delOpt.path, delOpt.isConf); - } + del_transaction_try(&db, delOpt.arg, delOpt.isConf); close_DB(&db); return 0; case DEL_ERR_WRONG_ARGS: printf("wrong del args\n"); break; case DEL_ERR_WRONG_PATH: - printf("path %s doesnt exist\n", delOpt.path); + printf("path %s doesnt exist\n", delOpt.arg); } error: close_DB(&db); -- cgit v1.2.3