From ed4032a90813ba29ee11c71ac6af3090d96789ce Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Tue, 25 Nov 2014 21:58:05 +1000 Subject: pacman-db-upgrade: fix issue with find argument list length overflow Signed-off-by: Allan McRae --- scripts/pacman-db-upgrade.sh.in | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/pacman-db-upgrade.sh.in b/scripts/pacman-db-upgrade.sh.in index 2fced9be..7bb277b9 100644 --- a/scripts/pacman-db-upgrade.sh.in +++ b/scripts/pacman-db-upgrade.sh.in @@ -174,7 +174,10 @@ if [[ -z "$db_version" ]]; then dirlist+=("${pacroot}${dir%/}") done < <(grep -h '/$' "$dbroot"/local/*/files | sort -ru) - mapfile -t dirlist < <(find "${dirlist[@]}" -maxdepth 0 -type l) + mapfile -t dirlist < <( + for dir in "${dirlist[@]}"; do + [[ -L "$dir" ]] && echo "$dir" + done) if [[ ${#dirlist[@]} != 0 ]]; then msg "$(gettext "Pre-4.2 database format detected - upgrading...")" -- cgit v1.2.3-24-g4f1b