From 0f8164842ac95341bf51447e0212bb1bbea96c77 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Thu, 6 Dec 2007 02:21:54 -0600 Subject: [PATCH] stat likes paths with trailing \\ for root directories. \\\\?\\k:\\ instead of \\\\?\\k: --- extra/io/windows/nt/backend/backend.factor | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/extra/io/windows/nt/backend/backend.factor b/extra/io/windows/nt/backend/backend.factor index c475771b5c..0d1f2cec0b 100755 --- a/extra/io/windows/nt/backend/backend.factor +++ b/extra/io/windows/nt/backend/backend.factor @@ -27,7 +27,7 @@ M: windows-nt-io normalize-pathname ( string -- string ) { [ dup ".\\" head? ] [ >r unicode-prefix cwd r> 1 tail 3append ] } - ! c:\\ + ! c:\\foo { [ dup 1 tail ":" head? ] [ >r unicode-prefix r> append ] } ! \\\\?\\c:\\foo { [ dup unicode-prefix head? ] [ ] } @@ -38,7 +38,8 @@ M: windows-nt-io normalize-pathname ( string -- string ) dup first CHAR: \\ = [ CHAR: \\ , ] unless % ] "" make ] } - } cond [ "/\\." member? ] right-trim ; + } cond [ "/\\." member? ] right-trim + dup peek CHAR: : = [ "\\" append ] when ; SYMBOL: io-hash