From f1c8fb5b1b50af7a60685006c2cbe433290bcf39 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 25 May 2020 08:26:14 +0300 Subject: [PATCH] kiss: Simplify pkg_remove_files() --- kiss | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/kiss b/kiss index 0429a64..94403e8 100755 --- a/kiss +++ b/kiss @@ -992,11 +992,8 @@ pkg_remove_files() { elif [ -h "$file" ] && [ ! -d "$file" ]; then rm -f "$file" - # Skip directory symlinks. - elif [ -h "$file" ] && [ -d "$file" ]; then : - # Remove directories if empty. - elif [ -d "$file" ]; then + elif [ -d "$file" ] && [ ! -h "$file" ]; then rmdir "$file" 2>/dev/null ||: fi done ||: