stat likes paths with trailing \\ for root directories.

\\\\?\\k:\\ instead of \\\\?\\k:
release
Doug Coleman 2007-12-06 02:21:54 -06:00
parent b967f7747d
commit 0f8164842a
1 changed files with 3 additions and 2 deletions

View File

@ -27,7 +27,7 @@ M: windows-nt-io normalize-pathname ( string -- string )
{ [ dup ".\\" head? ] [ { [ dup ".\\" head? ] [
>r unicode-prefix cwd r> 1 tail 3append >r unicode-prefix cwd r> 1 tail 3append
] } ] }
! c:\\ ! c:\\foo
{ [ dup 1 tail ":" head? ] [ >r unicode-prefix r> append ] } { [ dup 1 tail ":" head? ] [ >r unicode-prefix r> append ] }
! \\\\?\\c:\\foo ! \\\\?\\c:\\foo
{ [ dup unicode-prefix head? ] [ ] } { [ dup unicode-prefix head? ] [ ] }
@ -38,7 +38,8 @@ M: windows-nt-io normalize-pathname ( string -- string )
dup first CHAR: \\ = [ CHAR: \\ , ] unless % dup first CHAR: \\ = [ CHAR: \\ , ] unless %
] "" make ] "" make
] } ] }
} cond [ "/\\." member? ] right-trim ; } cond [ "/\\." member? ] right-trim
dup peek CHAR: : = [ "\\" append ] when ;
SYMBOL: io-hash SYMBOL: io-hash