diff --git a/xbps-src/libexec/xbps-src-doinst-helper.sh.in b/xbps-src/libexec/xbps-src-doinst-helper.sh.in index cb2abdb3c49..66bc9dbdda8 100644 --- a/xbps-src/libexec/xbps-src-doinst-helper.sh.in +++ b/xbps-src/libexec/xbps-src-doinst-helper.sh.in @@ -116,7 +116,7 @@ install_src_phase() fi # Remove empty directories by default. if [ -z "$keep_empty_dirs" ]; then - find ${DESTDIR} -depth -type d -empty -delete + find ${DESTDIR} -depth -type d -exec rmdir 2>/dev/null {} \; fi # Strip bins/libs. if [ -z "$noarch" ]; then