1
0
mirror of https://codeberg.org/kiss-community/kiss synced 2024-12-25 08:30:05 -07:00

kiss: Simplify pkg_remove_files()

This commit is contained in:
Dylan Araps 2020-05-25 08:26:14 +03:00
parent 23a0e14aaa
commit f1c8fb5b1b
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E

5
kiss
View File

@ -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 ||: