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