Fix Windows normalize-pathname

db4
Slava Pestov 2008-02-05 16:35:57 -06:00
parent 50484f3e69
commit 2b9f977912
1 changed files with 3 additions and 3 deletions

View File

@ -1,8 +1,8 @@
USING: continuations destructors io.buffers io.files io.backend USING: continuations destructors io.buffers io.files io.backend
io.nonblocking io.windows io.windows.nt.backend kernel libc math io.nonblocking io.windows io.windows.nt.backend kernel libc math
threads windows windows.kernel32 alien.c-types alien.arrays threads windows windows.kernel32 alien.c-types alien.arrays
sequences combinators combinators.lib ascii splitting alien sequences combinators combinators.lib sequences.lib ascii
strings ; splitting alien strings ;
IN: io.windows.nt.files IN: io.windows.nt.files
M: windows-nt-io cwd M: windows-nt-io cwd
@ -47,7 +47,7 @@ M: windows-nt-io root-directory? ( path -- ? )
! \\foo ! \\foo
{ [ dup "\\" head? ] [ >r root-directory r> append prepend-prefix ] } { [ dup "\\" head? ] [ >r root-directory r> append prepend-prefix ] }
! c:\\foo ! c:\\foo
{ [ dup second CHAR: : = ] [ nip prepend-prefix ] } { [ dup ?second CHAR: : = ] [ nip prepend-prefix ] }
! foo.txt ! foo.txt
{ [ t ] [ [ first CHAR: \\ = "" "\\" ? ] keep 3append prepend-prefix ] } { [ t ] [ [ first CHAR: \\ = "" "\\" ? ] keep 3append prepend-prefix ] }
} cond ; } cond ;