summaryrefslogtreecommitdiff
path: root/finger.go
diff options
context:
space:
mode:
Diffstat (limited to 'finger.go')
-rw-r--r--finger.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/finger.go b/finger.go
index 941e705..75d8160 100644
--- a/finger.go
+++ b/finger.go
@@ -61,7 +61,12 @@ func fingerHandler(route RouteDirective) sr.Handler {
}
if st.Mode()&5 == 5 && (route.Modifiers.Exec || route.Type == "cgi") {
- buf, code, err := cgi.RunCGI(ctx, request, fpath, "/", nil)
+ workdir := filepath.Dir(fpath)
+ if route.Modifiers.ExecCmd != "" {
+ fpath = route.Modifiers.ExecCmd
+ }
+
+ buf, code, err := cgi.RunCGI(ctx, request, fpath, "/", workdir, nil)
if err != nil {
return finger.Error("execution error")
}