Fix directory-does-not-exist initarg buglet.
This commit is contained in:
parent
52f9cfa63c
commit
913023e377
1 changed files with 4 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue