]> gitweb.factorcode.org Git - factor.git/commitdiff
vocabs.metadata.resources: sometimes vocab-resources can be ``f``.
authorJohn Benediktsson <mrjbq7@gmail.com>
Fri, 9 Feb 2018 18:19:06 +0000 (10:19 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Fri, 9 Feb 2018 18:19:06 +0000 (10:19 -0800)
basis/vocabs/metadata/resources/resources.factor

index ca1d0e95c57f98f95f8d97f346f7b3f756353695..354b893acb4c4699436602abb34ba4f0100ab878 100644 (file)
@@ -33,10 +33,12 @@ ERROR: resource-missing pattern ;
     '[ _ match-pattern ] gather ;
 
 : vocab-resource-files ( vocab -- filenames )
-    [ vocab-resources ] [ vocab-dir-in-root ] bi
-    [
-        match-patterns [ expand-resource ] map concat
-    ] with-directory-files ;
+    dup vocab-resources [
+        swap vocab-dir-in-root
+        [
+            match-patterns [ expand-resource ] map concat
+        ] with-directory-files
+    ] [ drop f ] if* ;
 
 : copy-vocab-resources ( dir vocab -- )
     dup vocab-resource-files