From 4a182cfbade49380fcd18fd47707bc4d4f8d6044 Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Tue, 16 Feb 2010 18:40:40 -0800 Subject: [PATCH] fix append-path and vocab-dir to use path-separator --- core/io/pathnames/pathnames.factor | 2 +- core/vocabs/loader/loader.factor | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/io/pathnames/pathnames.factor b/core/io/pathnames/pathnames.factor index b307128efb..5a9c647973 100644 --- a/core/io/pathnames/pathnames.factor +++ b/core/io/pathnames/pathnames.factor @@ -103,7 +103,7 @@ PRIVATE> ] } [ [ trim-tail-separators ] - [ trim-head-separators ] bi* "/" glue + [ trim-head-separators ] bi* path-separator glue ] } cond ; diff --git a/core/vocabs/loader/loader.factor b/core/vocabs/loader/loader.factor index 2c0f67641d..0f2e3f7178 100644 --- a/core/vocabs/loader/loader.factor +++ b/core/vocabs/loader/loader.factor @@ -35,7 +35,9 @@ M: string vocab-path ( string -- path/f ) PRIVATE> : vocab-dir ( vocab -- dir ) - vocab-name { { CHAR: . CHAR: / } } substitute ; + vocab-name + os windows? { { CHAR: . CHAR: \\ } } { { CHAR: . CHAR: / } } ? + substitute ; : vocab-dir+ ( vocab str/f -- path ) [ vocab-name "." split ] dip