[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] "Go to parent directory" in spiffy's default directory l
From: |
Guy Banay |
Subject: |
[Chicken-users] "Go to parent directory" in spiffy's default directory listing |
Date: |
Sat, 21 May 2005 10:43:03 +0300 |
The link points to "..", which for some reason doesn't do the right
thing (all the browsers I tried interpret it as "Gradparent
directory"). Using a full path seemed to solve the problem. The output
of diff -u follows.
Cheers,
Guy.
--- spiffy-base.scm.old 2005-03-03 00:26:16.000000000 +0200
+++ spiffy-base.scm 2005-05-21 10:29:47.778917856 +0300
@@ -281,7 +281,10 @@
(let ([str (with-output-to-string
(lambda ()
(printf "<html><body bgcolor='#d6c610'><font face='Helvetica,
Arial'><h2>Index of ~a:</h2>
- <p><a href=\"..\">Go to parent
directory</a><font face='Courier'><table border=0><p>" path)
+ <p><a href=\"~a\">Go to parent
directory</a><font face='Courier'><table border=0><p>" path
+ (let ((foo (string-split path "/")))
+ (if (null? foo) "/"
+ (string-append "/" (string-intersperse
(drop-right foo 1) "/")))))
(let ([dir (sort (remove (lambda (s) (char=? #\. (string-ref s
0)))
(directory (make-pathname "." path)) )
string<?) ] )
- [Chicken-users] "Go to parent directory" in spiffy's default directory listing,
Guy Banay <=