From 403b4c41df0491cb2c9d61edeed8be7243eba96f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mat=C3=ADas=20Fonzo?= Date: Mon, 3 Dec 2018 12:11:25 -0300 Subject: [PATCH] qi: refactor prepending of 'packagedir' in delete_mode() --- qi/src/qi.in | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/qi/src/qi.in b/qi/src/qi.in index 33e6e3f0..14884c7e 100644 --- a/qi/src/qi.in +++ b/qi/src/qi.in @@ -658,17 +658,11 @@ create_mode() delete_mode() { - expunge="${1%%.tlz}" +# expunge="${1%%.tlz}" - echo "<<< Deleting package $rootdir${expunge} from $packagedir ..." + expunge="${packagedir}/$(basename -- $1 .tlz)" - # If package is not a fully qualified directory, - # prepend it with the value of packagedir. - - if ! fnmatch "${packagedir}*" "$expunge" - then - expunge="${packagedir}/$expunge" - fi + echo "<<< Deleting package $rootdir${expunge} ..." # Complain if the package directory does not exist -- 2.11.4.GIT