Commit c8bd59427b07b37b404589a27cd737834bd83df3

Thomas de Grivel 2018-06-10T09:52:14

use probe-file

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/thot.lisp b/thot.lisp
index 5c6307a..05c247d 100644
--- a/thot.lisp
+++ b/thot.lisp
@@ -487,9 +487,8 @@ The requested url "
         (when (debug-p :file)
           (format t "local-path ~S~%" local-path)
           (force-output))
-        (with-stat (stat nil) local-path
-          (unless (s-isreg (stat-mode stat))
-            `(file ,local-path)))))))
+        (when (probe-file local-path)
+          `(file ,local-path))))))
 
 (defparameter *url-handlers*
   '((file-handler "/var/www/htdocs/" "/")