]> gitweb.factorcode.org Git - factor.git/commitdiff
fix windows bootstrap
authorU-FROGGER\erg <erg@frogger.(none)>
Wed, 26 Mar 2008 15:17:20 +0000 (10:17 -0500)
committerU-FROGGER\erg <erg@frogger.(none)>
Wed, 26 Mar 2008 15:17:20 +0000 (10:17 -0500)
extra/io/windows/nt/files/files.factor

index 1c8d88c872705bedd7d13d8b260cd160141a54df..c6cbf292b325c8bd76ea2e51ea7b40eaa3c2fc91 100755 (executable)
@@ -65,12 +65,17 @@ ERROR: empty-pathname ;
 
 USE: tools.walker
 M: windows-nt-io normalize-pathname ( string -- string )
-    dup string? [ nonstring-pathname ] unless
-    dup empty? [ empty-pathname ] when
-    { { CHAR: / CHAR: \\ } } substitute
-    current-directory get swap windows-append-path
-    [ "/\\." member? ] right-trim
-    dup peek CHAR: : = [ "\\" append ] when ;
+    "resource:" ?head [
+        left-trim-separators resource-path
+        normalize-pathname
+    ] [
+        dup string? [ nonstring-pathname ] unless
+        dup empty? [ empty-pathname ] when
+        { { CHAR: / CHAR: \\ } } substitute
+        current-directory get swap windows-append-path
+        [ "/\\." member? ] right-trim
+        dup peek CHAR: : = [ "\\" append ] when
+    ] if ;
 
 M: windows-nt-io CreateFile-flags ( DWORD -- DWORD )
     FILE_FLAG_OVERLAPPED bitor ;