From 2bf03aa546d241307bc05d5f2fe101ef67726970 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Wed, 7 Jun 2023 00:28:45 +0200 Subject: [PATCH] avoid nonexitent globs in attachment_glob() (i.e. foo-*.bar) --- tools.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools.sh b/tools.sh index b714ec6..6388e3f 100755 --- a/tools.sh +++ b/tools.sh @@ -83,6 +83,7 @@ attachment_glob(){ esac \ | sort -u \ | while read -r glob; do + [ -e "$glob" ] || continue pagedir="$(page_abs "${glob%%/#attachments/*}/")" [ -d "$_DATA/pages/$pagedir" -o -d "$_EXEC/pages/$pagedir" ] \ && printf '%s\n' "${glob%%/#attachments/*}/${glob#*/#attachments/}" -- 2.39.2