Commit 14ebc6f2873c7076fa2bd6ab4dc939337fe203a2

Thomas de Grivel 2018-06-03T23:08:07

debug directory

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/thot.lisp b/thot.lisp
index 9a23027..35ebfc9 100644
--- a/thot.lisp
+++ b/thot.lisp
@@ -400,10 +400,12 @@ The requested url ~S was not found on this server."
 
 (defun directory-handler (local remote)
   (let ((dir (path-as-directory (request-uri))))
-    (format t "dir ~S local ~S remote ~S~%" dir local remote)
+    (when (debug-p :directory)
+      (format t "dir ~S local ~S remote ~S~%" dir local remote))
     (when (prefix-p remote dir)
       (let ((subdir (subseq dir (length remote))))
-        (format t "subdir ~S~%" subdir)
+        (when (debug-p :directory)
+          (format t "subdir ~S~%" subdir))
         (when (probe-directory (str local subdir))
           `(directory-index ,local ,remote ,subdir))))))