Fix directory-does-not-exist initarg buglet.

This commit is contained in:
Brit Butler 2014-11-02 20:45:00 -05:00
parent 52f9cfa63c
commit 913023e377

View file

@ -31,14 +31,14 @@ BODY on files that match the given extension."
(constantly t)))))) (constantly t))))))
(define-condition directory-does-not-exist (error) (define-condition directory-does-not-exist (error)
((directory :initarg dir :reader dir)) ((directory :initarg :dir :reader dir))
(:report (lambda (c stream) (:report (lambda (c stream)
(format stream "The directory '~A' does not exist" (dir c))))) (format stream "The directory '~A' does not exist" (dir c)))))
(defun (setf getcwd) (path) (defun (setf getcwd) (path)
"Change the operating system's current directory to PATH." "Change the operating system's current directory to PATH."
(setf path (ensure-directory-pathname path)) (setf path (ensure-directory-pathname path))
(or (and (directory-exists-p path) (unless (and (directory-exists-p path)
(chdir path)) (chdir path))
(error 'directory-does-not-exist :dir path)) (error 'directory-does-not-exist :dir path))
path) path)