Commit d4dfedbd512c2293744c82a77c93042fb56f6fcd

Thomas de Grivel 2019-10-27T16:27:57

allow opening pathnames

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/unistd-stream-open.lisp b/unistd-stream-open.lisp
index 61da218..4ca9089 100644
--- a/unistd-stream-open.lisp
+++ b/unistd-stream-open.lisp
@@ -31,6 +31,8 @@
   (assert (or read write)
           (read write)
           "Open not for reading nor writing.")
+  (when (pathnamep pathname)
+    (setq pathname (namestring pathname)))
   (let* ((flags (compute-flags read write append non-blocking create))
          (mode (compute-mode create))
          (fd (fcntl:open pathname flags mode))