]> gitweb.factorcode.org Git - factor.git/commitdiff
globs: use path-separator? to allow windows to split on /.
authorJohn Benediktsson <mrjbq7@gmail.com>
Mon, 28 Mar 2016 13:38:05 +0000 (06:38 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 28 Mar 2016 13:38:32 +0000 (06:38 -0700)
basis/globs/globs.factor

index 67fe73ae8b2531e1f14135b8745dd7479df72455..7009b6f876baed2df2dbb02972933b18a79e6054 100644 (file)
@@ -51,6 +51,11 @@ Main = Concatenation End
 
 <PRIVATE
 
+! TODO: simplify
+! TODO: handle two more test cases
+! TODO: make case-fold an option, off by default
+! TODO: maybe make case-fold an option on regexp
+
 DEFER: glob-directory%
 
 : ?glob-directory% ( root remaining entry -- )
@@ -129,7 +134,7 @@ DEFER: glob-directory%
         over glob-pattern?
     ] [
         [
-            path-separator first over last-index
+            dup [ path-separator? ] find-last drop
             [ cut rest ] [ "" swap ] if*
         ] dip swap prefix
     ] while ;