Skip to content
Browse files

Which(1) already checks if file is executable.

  • Loading branch information...
1 parent 749c362 commit 0b31cb49227556acc28c0948c73e82e3b8f3409e @ab ab committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 bashttpd.sh
View
2 bashttpd.sh
@@ -101,7 +101,7 @@ elif [ -f ${URL_PATH} -a ! -r ${URL_PATH} ]; then
elif [ -d ${URL_PATH} ]; then
# Return 200 for directory listings.
# If `tree` is installed, use that for pretty output.
- if [ -x "$( which tree )" ]; then
+ if which tree >/dev/null; then
CONTENT_TYPE="text/html"
CONTENT_BODY=$( tree -H "" -L 1 --du -D ${URL_PATH} )
else

0 comments on commit 0b31cb4

Please sign in to comment.
Something went wrong with that request. Please try again.