globs: fix glob pattern on directories.

locals-and-roots
John Benediktsson 2016-04-06 13:10:24 -07:00
parent 5cfd5ff224
commit f80057d4b0
1 changed files with 5 additions and 5 deletions

View File

@ -2,8 +2,8 @@
! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays combinators combinators.short-circuit
io.directories io.files io.files.info io.pathnames kernel locals
make peg.ebnf regexp regexp.combinators sequences splitting
strings system unicode ;
make peg.ebnf regexp regexp.combinators sequences strings system
unicode ;
IN: globs
: not-path-separator ( -- sep )
@ -62,10 +62,10 @@ DEFER: glob-directory%
directory-entries [ name>> "." head? ] reject ;
: ?glob-directory% ( root remaining entry -- )
directory? [
glob-directory%
over empty? [
2drop ,
] [
empty? [ , ] [ drop ] if
directory? [ glob-directory% ] [ 2drop ] if
] if ;
:: glob-wildcard% ( root globs -- )