Commit 0647472b authored by Robert Goldman's avatar Robert Goldman
Browse files

Make DELETE-DIRECTORY-TREE accept pathname-designator.

Use ENSURE-PATHNAME on its argument.
parent 386cb483
......@@ -648,11 +648,10 @@ the validation function designated (as per ENSURE-FUNCTION) by the VALIDATE keyw
which in practice is thus compulsory, and validates by returning a non-NIL result.
If you're suicidal or extremely confident, just use :VALIDATE T."
(check-type if-does-not-exist (member :error :ignore))
(setf directory-pathname (ensure-pathname directory-pathname
:want-pathname t :want-non-wild t
:want-physical t :want-directory t))
((not (and (pathnamep directory-pathname) (directory-pathname-p directory-pathname)
(physical-pathname-p directory-pathname) (not (wild-pathname-p directory-pathname))))
(parameter-error "~S was asked to delete ~S but it is not a physical non-wildcard directory pathname"
'delete-directory-tree directory-pathname))
((not validatep)
(parameter-error "~S was asked to delete ~S but was not provided a validation predicate"
'delete-directory-tree directory-pathname))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment