]> git.plutz.net Git - shellwiki/blobdiff - handlers/20_page.sh
speed improvement: save fork when checking mdfile existence
[shellwiki] / handlers / 20_page.sh
index 87af6850279a517c957be9440221c8a0f4a4b8e2..eb894c2cda080d8b5a9c8819a86c91eea510df0f 100755 (executable)
@@ -56,7 +56,7 @@ case "${PATH_INFO}" in
     return 1
     ;;
   */)
-    if [ ! "$(mdfile "$PATH_INFO")" ]; then
+    if ! mdfile "$PATH_INFO" >&-; then
       theme_error 404
     elif ! acl_read "$PATH_INFO"; then
       theme_error 403