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,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)
|
||||||
|
|
Loading…
Add table
Reference in a new issue