Ugly kludge to fix (glob "/*"): The code treats "" as "/" but
directory-files doesn't.
This commit is contained in:
+2
-2
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user