ソースを参照

Fix directory-does-not-exist initarg buglet.

Brit Butler 10 年 前
コミット
913023e377
共有1 個のファイルを変更した4 個の追加4 個の削除を含む
  1. 4 4
      src/util.lisp

+ 4 - 4
src/util.lisp

@@ -31,16 +31,16 @@ BODY on files that match the given extension."
31 31
                                         (constantly t))))))
32 32
 
33 33
 (define-condition directory-does-not-exist (error)
34
-  ((directory :initarg dir :reader dir))
34
+  ((directory :initarg :dir :reader dir))
35 35
   (:report (lambda (c stream)
36 36
              (format stream "The directory '~A' does not exist" (dir c)))))
37 37
 
38 38
 (defun (setf getcwd) (path)
39 39
   "Change the operating system's current directory to PATH."
40 40
   (setf path (ensure-directory-pathname path))
41
-  (or (and (directory-exists-p path)
42
-           (chdir path))
43
-      (error 'directory-does-not-exist :dir path))
41
+  (unless (and (directory-exists-p path)
42
+               (chdir path))
43
+    (error 'directory-does-not-exist :dir path))
44 44
   path)
45 45
 
46 46
 (defmacro with-current-directory (path &body body)