From fbd4f8999b89af979a233f554b7ee7ab71c3800d Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sat, 27 Jul 2013 15:27:22 -0400 Subject: update_feeds(): Verify expansion of pathname. --- (limited to 'lib') diff --git a/lib/index.sh b/lib/index.sh index 0320f75..289cb78 100644 --- a/lib/index.sh +++ b/lib/index.sh @@ -97,15 +97,27 @@ update_feeds() # For each suite: for suite_dirent in "${archive}/feeds/.db/"*_*/; do + if [ ! -d "${suite_dirent}" ]; then + continue + fi # For each archplat: for archplat_dirent in "${suite_dirent}/"*_*/; do + if [ ! -d "${archplat_dirent}" ]; then + continue + fi # For each section: for sect_direct in "${archplat_dirent}/"*/; do + if [ ! -d "${sect_dirent}" ]; then + continue + fi # Get the feed path from the index path. feed="$(printf '%s\n' "${sect_dirent}" | \ sed "${script}")" # For each package name hash: for hash_dirent in "${sect_dirent}/"*; do + if [ ! -d "${hash_dirent}" ]; then + continue + fi idx="${feed}/.db/${hash_dirent##*/}" # Ensure there are still packages here. if [ -d "${idx}/info" ]; then -- cgit v0.9.1