]> git.saurik.com Git - wxWidgets.git/commitdiff
Correction to path/URL code
authorJulian Smart <julian@anthemion.co.uk>
Sat, 7 Dec 2002 09:18:44 +0000 (09:18 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sat, 7 Dec 2002 09:18:44 +0000 (09:18 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18092 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/filesys.cpp

index 97d2f78d4be27c5cad872a0de849423bb967e896..d335bf7e7a63549af9c4d7f7541498d61f31c641 100644 (file)
@@ -431,7 +431,7 @@ wxString wxFileSystem::URLToNativePath( const wxString& url )
                path = path.Mid(7) ;
        }
 
-/*
+#ifndef __UNIX__
        // file urls either start with a forward slash (local harddisk),
     // otherwise they have a servername/sharename notation,
     // which only exists on msw and corresponds to a unc
@@ -439,15 +439,13 @@ wxString wxFileSystem::URLToNativePath( const wxString& url )
        {
                path = path.Mid(1) ;
        }
-#ifdef __WXMSW__
        else if ( (url.Find(wxT("file://")) == 0) &&
               (path.Find(wxT('/')) != wxNOT_FOUND) &&
               (path.Length() > 1) && (path[1u] != wxT(':')) )
        {
-               path = wxT("\\\\") + path ;
+               path = wxT("//") + path ;
        }
 #endif
-*/
 
        path.Replace(g_unixPathString, g_nativePathString) ;
 
@@ -459,7 +457,6 @@ wxString wxFileSystem::NativePathToURL( const wxString& path )
 {
        wxString url = path ;
 
-/*
 #ifdef __WXMSW__
        // unc notation
        if ( url.Find(wxT("\\\\")) == 0 ) 
@@ -471,7 +468,6 @@ wxString wxFileSystem::NativePathToURL( const wxString& path )
        {
                url = wxT("/") + url ;
        }
-*/
 
        url.Replace(g_nativePathString, g_unixPathString) ;
        url = wxT("file://") + url ;