Normalize vocabulary roots by removing the last path separator so that scaffold tool works with trailing separators

db4
Doug Coleman 2010-06-21 13:06:09 -05:00
parent d8ab5edb83
commit 3b11e2d6aa
2 changed files with 4 additions and 1 deletions

View File

@ -22,7 +22,9 @@ M: bad-developer-name summary
<PRIVATE
: vocab-root? ( string -- ? ) vocab-roots get member? ;
: vocab-root? ( string -- ? )
trim-tail-separators
vocab-roots get member? ;
: contains-dot? ( string -- ? ) ".." swap subseq? ;

View File

@ -22,6 +22,7 @@ SYMBOL: add-vocab-root-hook
] "vocabs.loader" add-startup-hook
: add-vocab-root ( root -- )
trim-tail-separators
[ vocab-roots get adjoin ]
[ add-vocab-root-hook get-global call( root -- ) ] bi ;