fix with-directory. i thought i did this already..
parent
2dffb31e53
commit
4994a0e435
|
@ -121,3 +121,5 @@ USING: tools.test io.files io threads kernel continuations ;
|
||||||
[ ] [ "copy-destination" temp-file delete-tree ] unit-test
|
[ ] [ "copy-destination" temp-file delete-tree ] unit-test
|
||||||
|
|
||||||
[ ] [ "copy-tree-test" temp-file delete-tree ] unit-test
|
[ ] [ "copy-tree-test" temp-file delete-tree ] unit-test
|
||||||
|
|
||||||
|
[ t ] [ cwd "misc" resource-path [ ] with-directory cwd = ] unit-test
|
||||||
|
|
|
@ -84,7 +84,7 @@ HOOK: cd io-backend ( path -- )
|
||||||
HOOK: cwd io-backend ( -- path )
|
HOOK: cwd io-backend ( -- path )
|
||||||
|
|
||||||
: with-directory ( path quot -- )
|
: with-directory ( path quot -- )
|
||||||
swap cd cwd [ cd ] curry [ ] cleanup ; inline
|
cwd [ cd ] curry rot cd [ ] cleanup ; inline
|
||||||
|
|
||||||
! Creating directories
|
! Creating directories
|
||||||
HOOK: make-directory io-backend ( path -- )
|
HOOK: make-directory io-backend ( path -- )
|
||||||
|
@ -223,4 +223,4 @@ HOOK: <file-appender> io-backend ( path -- stream )
|
||||||
{ [ winnt? ] [ "USERPROFILE" os-env ] }
|
{ [ winnt? ] [ "USERPROFILE" os-env ] }
|
||||||
{ [ wince? ] [ "" resource-path ] }
|
{ [ wince? ] [ "" resource-path ] }
|
||||||
{ [ unix? ] [ "HOME" os-env ] }
|
{ [ unix? ] [ "HOME" os-env ] }
|
||||||
} cond ;
|
} cond ;
|
||||||
|
|
Loading…
Reference in New Issue