]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/filesys.cpp
Platform and compiler-specific checking for MSW and Mac now done
[wxWidgets.git] / src / common / filesys.cpp
index ceb2810018702e17941cca945c5f17470f3abca1..4213f32dc4e48a190ae1c1a39cc10f32883a08af 100644 (file)
@@ -190,8 +190,11 @@ wxFSFile* wxLocalFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs), const wxString&
     return new wxFSFile(new wxFFileInputStream(fullpath),
                         right,
                         GetMimeTypeFromExt(location),
-                        GetAnchor(location),
-                        wxDateTime(wxFileModificationTime(fullpath)));
+                        GetAnchor(location)
+#if wxUSE_DATETIME
+                        ,wxDateTime(wxFileModificationTime(fullpath))
+#endif // wxUSE_DATETIME
+                        );
 }
 
 wxString wxLocalFSHandler::FindFirst(const wxString& spec, int flags)
@@ -441,6 +444,11 @@ wxFileName wxFileSystem::URLToFileName(const wxString& url)
        {
                path = path.Mid(5);
        }
+       // Remove preceding double slash on Mac Classic
+#if defined(__WXMAC__) && !defined(__UNIX__)
+    else if ( path.Find(wxT("//")) == 0 )
+        path = path.Mid(2);
+#endif
     
     path.Replace(wxT("%25"), wxT("%"));
     path.Replace(wxT("%3A"), wxT(":"));
@@ -482,6 +490,10 @@ wxString wxFileSystem::FileNameToURL(const wxFileName& filename)
     else
     {
         url = wxT("/") + url;
+#ifdef __WXMAC__
+        url = wxT("/") + url;
+#endif
+
     }
 #endif