Commit dc0e5f9b6e92b138f26c91c1a9ffa31b4df0720b

Thomas de Grivel 2018-06-10T09:07:53

use probe-dir instead of stat

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 9942ac4..acfd737 100644
--- a/thot.lisp
+++ b/thot.lisp
@@ -440,9 +440,8 @@ The requested url "
         (when (debug-p :directory)
           (format t "subdir ~S local-path ~S~%" subdir local-path)
           (force-output))
-        (with-stat (stat nil) local-path
-          (when (s-isdir (stat-mode stat))
-            `(directory-index ,local ,remote ,subdir)))))))
+        (when (probe-dir local-path)
+          `(directory-index ,local ,remote ,subdir))))))
 
 (defun fd-file-size (fd)
   (let ((end (unistd:lseek fd 0 unistd:+seek-end+)))