r2673: Auto commit for Debian build
[lml.git] / downloads.cl
index 3889dea3f654924ecda8a84e81b6bfeb5c6ad2ba..bba97ca71f3e3f06c80ef587568a4df8c635565b 100644 (file)
@@ -7,7 +7,7 @@
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Aug 2002
 ;;;;
-;;;; $Id: downloads.cl,v 1.1 2002/09/16 01:13:49 kevin Exp $
+;;;; $Id: downloads.cl,v 1.2 2002/09/16 03:09:00 kevin Exp $
 ;;;;
 ;;;; This file, part of LML, is Copyright (c) 2002 by Kevin M. Rosenberg
 ;;;;
@@ -43,7 +43,7 @@
               (subseq (length bdir) (length fdir) fdir))))))
      
 (defun print-file (file)
-  (let ((size (round (/ (file-length file) 1024)))
+  (let ((size 0)
        (modtime (date-string (file-write-date file)))
        (basename (namestring
                   (make-pathname :name (pathname-name file)
@@ -54,6 +54,8 @@
                        :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)