aboutsummaryrefslogtreecommitdiffstats
path: root/src/actions.c
diff options
context:
space:
mode:
authorgramanas <anastasis.gramm2@gmail.com>2018-10-03 16:57:06 +0300
committergramanas <anastasis.gramm2@gmail.com>2018-10-03 16:57:06 +0300
commitbc2899dd69fce0f1868dbfad3394ef8b3dc48069 (patch)
treed6237ac42ea12a34ceb08117685c3fcbe5136d59 /src/actions.c
parent1cfbedd0b199d77ed53e5224435a76978875e2fb (diff)
downloadck-bc2899dd69fce0f1868dbfad3394ef8b3dc48069.tar.gz
ck-bc2899dd69fce0f1868dbfad3394ef8b3dc48069.tar.bz2
ck-bc2899dd69fce0f1868dbfad3394ef8b3dc48069.zip
Basic delete
Diffstat (limited to 'src/actions.c')
-rw-r--r--src/actions.c10
1 files changed, 2 insertions, 8 deletions
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);