Ugly kludge to fix (glob "/*"): The code treats "" as "/" but

directory-files doesn't.
This commit is contained in:
mainzelm 2003-01-07 10:45:01 +00:00
parent 5da13e0f55
commit 02e2c02e38
1 changed files with 2 additions and 2 deletions

View File

@ -46,7 +46,7 @@
(let ((pat (car pats))
(pats (cdr pats))
(dir (file-name-as-directory file)))
(receive (winners sure?) (glob-subpat file pat)
(receive (winners sure?) (glob-subpat dir pat)
(apply append (map (lambda (f)
(recur (string-append dir f) pats sure?))
winners))))
@ -202,7 +202,7 @@
(define (maybe-directory-files path dotfiles?)
(with-errno-handler ((errno data)
(else '())) ; On any error, return ().
(directory-files path dotfiles?)))
(directory-files (if (string=? path "") "." path) dotfiles?)))
;;; Make an effort to find out if the file is a directory. If there's
;;; any error, return #f.