X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/008a56c968ed7e0694e32e93c2dbf95dde2ba5c8..1eb1eae717bea7942825313db9074529927db482:/src/common/filesys.cpp diff --git a/src/common/filesys.cpp b/src/common/filesys.cpp index ceb2810018..4213f32dc4 100644 --- a/src/common/filesys.cpp +++ b/src/common/filesys.cpp @@ -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