From f4019408cacd595170abc977c741ade41525377a Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 26 Apr 2015 09:46:02 +0200 Subject: [PATCH] hooks/remote-empty-dirs: switch back to my version that really works. I'm not sure how the guy that submitted the PR tested it, but IT DOES NOT WORK AS HE EXPECTED. --- common/hooks/post-install/03-remove-empty-dirs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/hooks/post-install/03-remove-empty-dirs.sh b/common/hooks/post-install/03-remove-empty-dirs.sh index 00f198d52a2..4e73f6b34fc 100644 --- a/common/hooks/post-install/03-remove-empty-dirs.sh +++ b/common/hooks/post-install/03-remove-empty-dirs.sh @@ -1,7 +1,7 @@ # This hooks removes empty dirs and warns about them. hook() { - find ${PKGDESTDIR} -type d -empty -print0|sort -z -r|while IFS="" read f; do + for f in $(find ${PKGDESTDIR} -type d -empty|sort -r); do _dir="${f##${PKGDESTDIR}}" [ -z "${_dir}" ] && continue rmdir --ignore-fail-on-non-empty -p "$f" &>/dev/null