From f0a900d11b7446dc7cbbb0d617c517818232ae3d Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Thu, 27 Mar 2008 17:12:39 -0500 Subject: [PATCH] Fix Windows bootstrap --- core/io/backend/backend.factor | 6 ++++-- core/io/files/files.factor | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/core/io/backend/backend.factor b/core/io/backend/backend.factor index 151dbc7df7..6bcd448385 100755 --- a/core/io/backend/backend.factor +++ b/core/io/backend/backend.factor @@ -1,6 +1,7 @@ ! Copyright (C) 2007, 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: init kernel system namespaces io io.encodings io.encodings.utf8 ; +USING: init kernel system namespaces io io.encodings +io.encodings.utf8 init assocs ; IN: io.backend SYMBOL: io-backend @@ -22,7 +23,8 @@ HOOK: normalize-pathname io-backend ( str -- newstr ) M: object normalize-directory normalize-pathname ; : set-io-backend ( io-backend -- ) - io-backend set-global init-io init-stdio ; + io-backend set-global init-io init-stdio + "io.files" init-hooks get at call ; [ init-io embedded? [ init-stdio ] unless ] "io.backend" add-init-hook diff --git a/core/io/files/files.factor b/core/io/files/files.factor index f6888bf78d..436bf8598d 100755 --- a/core/io/files/files.factor +++ b/core/io/files/files.factor @@ -170,7 +170,7 @@ SYMBOL: current-directory M: object cwd ( -- path ) "." ; -[ cwd current-directory set-global ] "current-directory" add-init-hook +[ cwd current-directory set-global ] "io.files" add-init-hook : with-directory ( path quot -- ) current-directory swap with-variable ; inline