r2835: *** empty log message ***
[lml.git] / downloads.cl
index 6538845f7cea1ed931cce22a56623610b5679e56..7b528d4bdde327496463939929a1a03d21395087 100644 (file)
@@ -7,7 +7,7 @@
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Aug 2002
 ;;;;
-;;;; $Id: downloads.cl,v 1.4 2002/09/16 03:22:16 kevin Exp $
+;;;; $Id: downloads.cl,v 1.7 2002/09/16 03:43:44 kevin Exp $
 ;;;;
 ;;;; This file, part of LML, is Copyright (c) 2002 by Kevin M. Rosenberg
 ;;;;
                   (make-pathname :name (pathname-name file)
                                  :type (pathname-type file))))
        (ftp-name (strip-ftp-base file))
-       (sig-path 
-        (make-pathname :defaults file
-                       :type 
-                       (concatenate 'string
-                                    (pathname-type file) ".asc"))))
-    (with-open-file (strm file :direction :input)
-      (setq size (round (/ (file-length strm) 1024))))
-    (lml-print "<a href=\"~A~A\">~A</a>" *ftp-url* ftp-name basename)
-    (lml-print "<span class=\"modtime\">")
-    (lml-print " (~A, <b>~:D <span style=\"font-size:90%;\">KB</span></b>)</span>" modtime size)
-    (when (probe-file sig-path)
-      (setq *signed* t)
-      (lml-print " [<a href=\"~A~A.asc\">Signature</a>]" *ftp-url* ftp-name))
-     (br)))
+       (sig-path (concatenate 'string (namestring file) ".asc")))
+    (when (plusp (length basename))
+      (with-open-file (strm file :direction :input)
+                     (setq size (round (/ (file-length strm) 1024))))
+      (lml-print "<a href=\"~A~A\">~A</a>" *ftp-url* ftp-name basename)
+      (lml-print "<span class=\"modtime\">")
+      (lml-print " (~A, <b>~:D <span style=\"font-size:90%;\">KB</span></b>)</span>" modtime size)
+      (when (probe-file sig-path)
+       (setq *signed* t)
+       (lml-print " [<a href=\"~A~A.asc\">Signature</a>]" *ftp-url* ftp-name))
+      (br))))
 
 (defun display-header (name url)
   (lml-print "<h1>Download</h1>")