X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/008a56c968ed7e0694e32e93c2dbf95dde2ba5c8..7f0586ef60f9ac456ebad639026c14ed89d46c8b:/src/common/filesys.cpp diff --git a/src/common/filesys.cpp b/src/common/filesys.cpp index ceb2810018..c1e3070423 100644 --- a/src/common/filesys.cpp +++ b/src/common/filesys.cpp @@ -28,7 +28,6 @@ #include "wx/log.h" - //-------------------------------------------------------------------------------- // wxFileSystemHandler //-------------------------------------------------------------------------------- @@ -190,8 +189,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) @@ -320,7 +322,7 @@ wxFSFile* wxFileSystem::OpenFile(const wxString& location) unsigned i, ln; char meta; wxFSFile *s = NULL; - wxNode *node; + wxList::compatibility_iterator node; ln = loc.Length(); meta = 0; @@ -374,7 +376,7 @@ wxFSFile* wxFileSystem::OpenFile(const wxString& location) wxString wxFileSystem::FindFirst(const wxString& spec, int flags) { - wxNode *node; + wxList::compatibility_iterator node; wxString spec2(spec); m_FindFileHandler = NULL; @@ -421,8 +423,7 @@ void wxFileSystem::AddHandler(wxFileSystemHandler *handler) void wxFileSystem::CleanUpHandlers() { - m_Handlers.DeleteContents(TRUE); - m_Handlers.Clear(); + WX_CLEAR_LIST(wxList, m_Handlers); } const static wxString g_unixPathString(wxT("/")); @@ -441,6 +442,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 +488,10 @@ wxString wxFileSystem::FileNameToURL(const wxFileName& filename) else { url = wxT("/") + url; +#ifdef __WXMAC__ + url = wxT("/") + url; +#endif + } #endif