Commit 34ed04a5a0af763de2ead5750b064334ef4df6e7

Thomas de Grivel 2023-11-04T23:50:16

fix macos

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/unix/stat.lisp b/unix/stat.lisp
index a29cff5..2dd84da 100644
--- a/unix/stat.lisp
+++ b/unix/stat.lisp
@@ -85,11 +85,10 @@
   (octal (mode-fixnum mode)))
 
 (defun parse-mode-string (s)
-  (let ((type (when (= 10 (length s))
-                (let ((c (char s 0)))
-                  (setq s (subseq s 1))
-                  (or (find c +stat-mode-types+ :key #'cadr :test #'char=)
-                      (error "Unknown mode type : ~C" c))))))
+  (let ((type (let ((c (char s 0)))
+                (find c +stat-mode-types+ :key #'second :test #'char=))))
+    (when type
+      (setq s (subseq s 1)))
     (make-instance
      'mode :fixnum
      (logior