aboutsummaryrefslogtreecommitdiff
path: root/index.scml
diff options
context:
space:
mode:
Diffstat (limited to 'index.scml')
-rw-r--r--index.scml16
1 files changed, 6 insertions, 10 deletions
diff --git a/index.scml b/index.scml
index 0201d5b..8d8e51d 100644
--- a/index.scml
+++ b/index.scml
@@ -18,9 +18,9 @@
;;;;
(define ellinika-document-root "/home/gray/public_html/ellinika")
-(define ellinika-default-language "ru")
+(define ellinika-dispatcher "disp.html")
-(define (get-dir-name)
+(define (get-file-name)
(call-with-current-continuation
(lambda (return)
(for-each
@@ -29,12 +29,8 @@
(suff (list #\. #\_)))
(let ((dir (string-append ellinika-document-root "/" slang)))
(cond
- ((catch 'system-error
- (lambda ()
- (eq? (stat:type (stat dir)) 'directory))
- (lambda args
- #f))
- (return dir))
+ ((access? (string-append dir "/index.html") R_OK)
+ (return (string-append dir "/index.html")))
((not (null? suff))
(let ((p (let itr ((sl suff))
(if (null? sl)
@@ -57,10 +53,10 @@
(string-split
(table:get (request-rec:subprocess-env Request) "HTTP_ACCEPT_LANGUAGE")
#\,)))
- (string-append ellinika-document-root "/" ellinika-default-language))))
+ (string-append ellinika-document-root "/" ellinika-dispatcher))))
(with-input-from-file
- (string-append (get-dir-name) "/intro.html")
+ (get-file-name)
(lambda ()
(do ((line (read-line) (read-line)))
((eof-object? line))

Return to:

Send suggestions and report system problems to the System administrator.