rmdir: ignore unreadable path errors

This commit is contained in:
Eric Knibbe 2025-03-11 09:48:39 -04:00
parent ca3333592b
commit cae1ca33ec
No known key found for this signature in database

View File

@ -26,7 +26,7 @@ do
# Some packages leave broken symlinks around; we clean them out before
# attempting to `rmdir` to prevent extra cruft from accumulating.
/usr/bin/find -f "${path}" -- -mindepth 1 -maxdepth 1 -type l ! -exec /bin/test -e {} \; -delete
/usr/bin/find -f "${path}" -- -mindepth 1 -maxdepth 1 -type l ! -exec /bin/test -e {} \; -delete || true
elif ! ${symlink} && [[ ! -e "${path}" ]]
then
# Skip paths that don't exists and aren't a broken symlink.