From: Tim Vaughan Date: Sat, 4 May 2019 09:45:08 +0000 (+0200) Subject: Bugfix. X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=commitdiff_plain;h=074b068f25de41249ab1c76293ce5765960b19bb;p=scratchy.git Bugfix. --- diff --git a/burrow.scm b/burrow.scm index 700eb56..6be3251 100644 --- a/burrow.scm +++ b/burrow.scm @@ -87,12 +87,12 @@ (selector (car selector-list)) (arguments (cdr selector-list))) (case (infer-selector-type selector) - ((1) (serve-directory selector config)) + ((1) (serve-directory selector remote-ip config)) ((0) (serve-text-file selector config)) ((7) (serve-query selector arguments remote-ip config)) (else (serve-binary-file selector config))))) -(define (serve-directory selector config) +(define (serve-directory selector remote-ip config) (let ((file-name (make-pathname (list (config-root-dir config) selector) gopher-index-file-name))) (if (regular-file? file-name) @@ -106,7 +106,7 @@ (if (eq? c #\,) (begin (read-char) - (serve-record (read) selector config) + (serve-record (read) selector remote-ip config) (read-line)) (serve-info-records (read-line))) (loop (peek-char))))))) @@ -178,7 +178,7 @@ (print type display-string "\t" selector "\t" host "\t" port "\r")) ((type display-string selector host) (serve-record (list type display-string selector host 70) - dir-selectorconfig)) + dir-selector config)) ((type display-string selector) (serve-record (list type display-string (make-pathname dir-selector selector) @@ -199,7 +199,7 @@ (let-values (((in-port out-port id) (process command))) (serve-info-records (string-chomp (read-string #f in-port) "\n")))))) -(define (serve-expression expression path config) +(define (serve-expression expression dir-selector config) (with-selector-dir dir-selector config (lambda ()