Skip to content

Commit

Permalink
case 236 - was calling directory with non-portable arguments (thanks …
Browse files Browse the repository at this point in the history
…to Stelian Ionescu for reporting this)

darcs-hash:20081003033255-3cc5d-1f9d22cf0ecfa6c71d6dbd1eba994c8a327d4438.gz
  • Loading branch information
Gary King committed Oct 3, 2008
1 parent ae96974 commit 9a0d88f
Showing 1 changed file with 35 additions and 30 deletions.
65 changes: 35 additions & 30 deletions dev/utilities/files.lisp
Expand Up @@ -500,36 +500,41 @@ source."
:name (pathname-name directory-spec)
:type (pathname-type directory-spec)))))
:defaults directory-spec)))
(let* ((wild-directory
(make-pathname
:name :wild
:type :wild
:directory (append (pathname-directory directory-spec)
(list :wild-inferiors))
:defaults directory-spec))
(directories (sort
(directory wild-directory :directories t :files nil)
#'>
:key (compose #'length #'namestring))))
(mapc (lambda (directory)
(when verbose?
(format *debug-io* "~%;;; processing directory ~A" directory))
(mapc (lambda (file)
(when (probe-file file)
(when verbose?
(format *debug-io* "~%;; deleting ~A" file))
(unless dry-run?
(delete-file file))))
(directory (make-pathname :name :wild
:type :wild
:defaults directory)))
(when verbose?
(format *debug-io* "~%;; deleting directory ~A" directory))
(unless dry-run?
(delete-file directory)))
(append directories
(list directory-spec)))
(values nil)))
(flet ((directory-args ()
#+allegro
'(:directories t :files nil)
#-allegro
nil))
(let* ((wild-directory
(make-pathname
:name :wild
:type :wild
:directory (append (pathname-directory directory-spec)
(list :wild-inferiors))
:defaults directory-spec))
(directories (sort
(apply #'directory wild-directory (directory-args))
#'>
:key (compose #'length #'namestring))))
(mapc (lambda (directory)
(when verbose?
(format *debug-io* "~%;;; processing directory ~A" directory))
(mapc (lambda (file)
(when (probe-file file)
(when verbose?
(format *debug-io* "~%;; deleting ~A" file))
(unless dry-run?
(delete-file file))))
(directory (make-pathname :name :wild
:type :wild
:defaults directory)))
(when verbose?
(format *debug-io* "~%;; deleting directory ~A" directory))
(unless dry-run?
(delete-file directory)))
(append directories
(list directory-spec)))
(values nil))))

#+(or)
(defun directory-name-p (directory-spec)
Expand Down

0 comments on commit 9a0d88f

Please sign in to comment.