]> git.plutz.net Git - shellwiki/blobdiff - handlers/40_search.sh
search list: check if page content exists
[shellwiki] / handlers / 40_search.sh
index a4d91a82a8fa5e0f3861bf48f93ce6ac6fb1060b..038545711b5f2143bfb04e82f3635b2b93b97996 100644 (file)
@@ -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"