X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=attachment.sh;h=b5e8491298ed398a3e7e733d37ef109c74b10405;hb=b222bd291672e71b29ed352c3cf058d8345f342d;hp=68e03b9b7ab9435961ca41abbaa93e2667aced7d;hpb=ad80bc2c5d655b67abea18b7b6c107896e7b3150;p=shellwiki diff --git a/attachment.sh b/attachment.sh index 68e03b9..b5e8491 100755 --- a/attachment.sh +++ b/attachment.sh @@ -60,7 +60,10 @@ attachment_convert(){ esac } -if [ "${PATH_INFO%/\[attachment\]/*}" != "${PATH_INFO}" ]; then +if [ "${PATH_INFO%/\[attachment\]/}" != "${PATH_INFO}" ]; then + theme_attachments "${PATH_INFO%\[attachment\]/}" + +elif [ "${PATH_INFO%/\[attachment\]/*}" != "${PATH_INFO}" ]; then attpath="${PATH_INFO%/\[attachment\]/*}/#attachments/${PATH_INFO##*/}" if [ -f "$_DATA/pages/$attpath" ]; then FILE "$_DATA/pages/$attpath"