summaryrefslogtreecommitdiff
path: root/gosher
diff options
context:
space:
mode:
Diffstat (limited to 'gosher')
-rwxr-xr-xgosher6
1 files changed, 5 insertions, 1 deletions
diff --git a/gosher b/gosher
index 31e9abf..3dda536 100755
--- a/gosher
+++ b/gosher
@@ -209,7 +209,11 @@ case $selector in
if [ "${RP1}" = "${RP2}" ]; then
if [ -f "${RP1}" ]; then
- serve_selector "${RP1}"
+ if [ -n "$(echo $RP1 | sed -n '/\.gph$/p')" ]; then
+ serve_index $RP1
+ else
+ serve_selector "${RP1}"
+ fi
elif [ -d "${RP1}" ]; then
[ -f "${RP1}/gophermap" ] && serve_selector "${RP1}/gophermap"
[ -f "${RP1}/index.gph" ] && serve_index "${RP1}/index.gph"