kpatch: uninstall should only look in user-installed dir

This commit is contained in:
Josh Poimboeuf 2014-05-21 10:52:59 -05:00
parent 7e76dba346
commit 6dc6d78627

View File

@ -197,7 +197,7 @@ case "$1" in
"uninstall")
[[ "$#" -ne 2 ]] && usage
PATCH="$2"
find_module "$PATCH" || die "$PATCH is not installed"
[[ ! -e $USERDIR/$PATCH ]] && die "$PATCH is not installed"
echo "uninstalling $PATCH from $USERDIR"
rm -f "$USERDIR/$(basename $MODULE)" || die "failed to uninstall patch $PATCH"