From e4b6cd7578de989d8ef7bdb222cf6b84857db315 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Sun, 19 Oct 2008 18:47:23 -0500 Subject: [PATCH] directory throws now instead of returning nicely if does not exist --- basis/tools/vocabs/vocabs.factor | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/basis/tools/vocabs/vocabs.factor b/basis/tools/vocabs/vocabs.factor index 05f354a8a8..1f81ac5802 100644 --- a/basis/tools/vocabs/vocabs.factor +++ b/basis/tools/vocabs/vocabs.factor @@ -207,13 +207,16 @@ M: vocab-link summary vocab-summary ; dup vocab-authors-path set-vocab-file-contents ; : subdirs ( dir -- dirs ) - [ + dup [ [ link-info directory? ] filter - ] with-directory-files natural-sort ; + ] with-directory-files + [ append-path ] with map natural-sort ; : (all-child-vocabs) ( root name -- vocabs ) - [ vocab-dir append-path subdirs ] keep [ + vocab-dir append-path dup exists? + [ subdirs ] [ drop { } ] if + ] keep [ swap [ "." swap 3append ] with map ] unless-empty ;