From: Paul Hänsch Date: Wed, 7 Feb 2024 12:24:19 +0000 (+0100) Subject: search list: check if page content exists X-Git-Url: https://git.plutz.net/?p=shellwiki;a=commitdiff_plain;h=e9bb2b8721a5a47baa5b41ddead1238ea2a23221 search list: check if page content exists --- diff --git a/handlers/40_search.sh b/handlers/40_search.sh index a4d91a8..0385457 100644 --- a/handlers/40_search.sh +++ b/handlers/40_search.sh @@ -69,7 +69,7 @@ for w in ${words}; do while read date doc freq num total; do P="$_DATA/pages$(UNSTRING "$doc")" d="$(stat -c %Y -- "$P/#index.flag" 2>&-)" - [ "$d" -le "$date" ] 2>&- || continue + [ "$d" -le "$date" -a -f "$P/#page.md" ] 2>&- || continue printf '%s %f\n' "$doc" "$freq" done <"$I/$w"