From bc2899dd69fce0f1868dbfad3394ef8b3dc48069 Mon Sep 17 00:00:00 2001 From: gramanas Date: Wed, 3 Oct 2018 16:57:06 +0300 Subject: Basic delete --- src/actionhelper.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/actionhelper.c') diff --git a/src/actionhelper.c b/src/actionhelper.c index 596a7db..667b898 100644 --- a/src/actionhelper.c +++ b/src/actionhelper.c @@ -82,8 +82,7 @@ AddOpt add_make_options(cklist *args) { DelOpt del_make_options(cklist *args) { list_rewind(args); DelOpt delOpt = { - .prog = NULL, - .path = "", + .arg = NULL, .isConf = 0, .err = DEL_NO_ERR }; @@ -94,13 +93,13 @@ DelOpt del_make_options(cklist *args) { delOpt.err = DEL_ERR_WRONG_ARGS; return delOpt; } - realpath(list_get(args), delOpt.path); - if (!util_is_file_rw(delOpt.path)) { + delOpt.arg = list_get(args); + if (!util_is_file_rw(delOpt.arg)) { delOpt.err = DEL_ERR_WRONG_PATH; return delOpt; } } else { - delOpt.prog = list_get(args); + delOpt.arg = list_get(args); } list_rewind(args); -- cgit v1.2.3