Ugly kludge to fix (glob "/*"): The code treats "" as "/" but
directory-files doesn't.
This commit is contained in:
parent
5da13e0f55
commit
02e2c02e38
|
@ -46,7 +46,7 @@
|
||||||
(let ((pat (car pats))
|
(let ((pat (car pats))
|
||||||
(pats (cdr pats))
|
(pats (cdr pats))
|
||||||
(dir (file-name-as-directory file)))
|
(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)
|
(apply append (map (lambda (f)
|
||||||
(recur (string-append dir f) pats sure?))
|
(recur (string-append dir f) pats sure?))
|
||||||
winners))))
|
winners))))
|
||||||
|
@ -202,7 +202,7 @@
|
||||||
(define (maybe-directory-files path dotfiles?)
|
(define (maybe-directory-files path dotfiles?)
|
||||||
(with-errno-handler ((errno data)
|
(with-errno-handler ((errno data)
|
||||||
(else '())) ; On any error, return ().
|
(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
|
;;; Make an effort to find out if the file is a directory. If there's
|
||||||
;;; any error, return #f.
|
;;; any error, return #f.
|
||||||
|
|
Loading…
Reference in New Issue